$student_info = array(
'student_number'=>$_POST['student_number'],
'student_first_name'=>$_POST['student_first_name'],
'student_middle_name'=>$_POST['student_middle_name'],
'student_last_name'=>$_POST['student_last_name']);
foreach($student_info as $table_row=>$information){
$sql = "INSERT INTO student_info_db (`$table_row`) VALUES(`$information`)";
echo $table_row . " " . $information;
}
im not pretty sure why it doesnt insert any data on the database. the echo $table_row $information are just to se if it gets the value and it succeed, but still doesnt insert any data. the question is, what was wrong ? im pretty sure im doing the correct sql .. or am i not ?