I have wrote the following queries but the values being entered into the table are not right (see tables below). The project_ID isn't the same in both tables:
if (isset($_POST['submit']) && $_POST['submit'] == "Create Project") {
if ($_POST['lecturer_role'] != " " &&
$_POST['SK_ID'] != " " &&
$_POST['project_name'] != " " &&
$_POST['project_description'] != " ") {
mysql_query("INSERT INTO student_project
(project_ID, lecturer_role, LK_ID, SK_ID, project_name, project_desc)
VALUES('$projectid', '" . $_POST['role'] . "', '" . $_SESSION['user_logged'] . "',
'" . $_POST['students'] . "', '" . $_POST['project_name'] . "',
'" . $_POST['project_desc'] . "') ") ;
mysql_query("INSERT INTO project_assess
(project_assess_ID, project_ID, LK_ID)
VALUES('$assessid', '$projectid', '". $_SESSION['user_logged'] ."') ") ;
STUDENT_PROJECT
project_ID LK_ID SK_ID lecturer_role project_name project_desc
3
4
PROJECT_ASSESS
project_assess_ID project_ID LK_ID
3 0
4 0
project_ID seems to get a value of 0 in the PROJECT_ASSESS table.
Can anyone help?