Hello everyone
I have a problem with my insert statement
well in my database i have tables joined (well i never)
2 of the tables are called programme and validation
the programme id is a foregin key in the validation table
in my form i have fields which branch off and go into the two tables
but the data is only going into the programme table its not going in the validation table
i am using phpMyAdmin for my database and in the validation table i have the programme foreign key to cascade on update and delete
but still getting no data in this table and i need the table to link via the programme id
which im not putting in via the form because its auto increments within the database
the code i have at present is
$query = "INSERT INTO programme " . "
(programme.prog_ucas, programme.sits_code, programme.prog_title, programme.prog_type, programme.prog_first_intake, programme.prog_last_intake, programme.prog_notes, programme.prog_spec_regs)" . "
VALUES ('$ucas', '$sitscode', '$progtitle', '$progtype', '$firstintake', '$lastintake', '$notes', '$radiobutton')";
$result = mysql_query($query, $db);
$query1 = "INSERT INTO validation " . "
(validation.valid_date, validation.next_review_date, validation.notes)" . "
VALUES ('$validDate', '$NxtReview', '$Validnotes')";
$result1 = mysql_query($query1, $db);
i am hoping someone can help me with some adivse or tell me what im doing wrong
thanks
snoopgreen