Attendance Table:
- AttendID (AUTO_INCREMENT) (Primary Key)
- StudID
- ClassID
- attended
This SQL Insert is inserting records to my Attendance Table:
$query = mysql_query("insert into attend (StudID, ClassID, attended) values ('$data', '$data1', 1)", $connection);
But When I make the [StudID] and [ClassID] columns as Foreign Keys each one to a different table, The Insert won't insert records to my Attendance Table and there is no error showing in my code.
Help Please :(