I cannot insert database
success submit the form but database column data is empty.
"") {
++$studentID;
} else {
$studentID = "001";
}
extract($_POST);
$insertSQL = mysql_query("INSERT INTO student(sName, sID, sPass, sProgram, sBatch, sEmail, sContact1, sContact2, sIC, sGender, sDateOfBirth, sNational, sAddress)
VALUES ('$sName','$sID','$sPass','$sProgram','$sBatch','$sEmail','$sContact1','$sContact2','$sIC','$sGender','$sDateOfBirth','$sNational','$sAddress')");
if ($insertSQL) {
echo ''
, 'window.alert("Register Add Successful");'
, 'location.replace("studentRegister.php");'
, '';
}
else{
echo "alert('Submit Fail')";
}
}
?>