farahZ Posted July 8, 2013 Share Posted July 8, 2013 i am not able to figure out why my data isnt sent to the database!it was working fine before.. any help?var_dump isn't outputting if ( ! empty( $_POST ) ) { if(isset($_REQUEST['save'])) { if($sql=$db->query("INSERT INTO `kafala`.`std_basic` ( `fname` ,`sname` ,`lname` ,`mname` ,`std_num` ,`acc_family` ,`home_phone` ,`mobile_phone` ,`email` ,`std_type` ,`sex` ,`nas` ,`mazhab` ,`dob` ,`sec_lan` ,`pic`,`std_siblings`,`std_mo3arrif`) VALUES (NULL , '".es("fname")."', '".es("sname")."', '".es("lname")."', '".es("mname")."', '".es("std_num")."', '".es("acc_family")."', '".es("home_phone")."', '".es("mobile_phone")."', '".es("email")."', '".es("std_type")."', '".es("sex")."', '".es("nas")."', '".es("mazhab")."', '".es("dob")."','".es("sec_lan")."', '".$path."', '".es("std_siblings")."', '".es("std_mo3arrif")."')")); var_dump($sql); { echo "تمت اضافة الطالب<br>"; header("Location: newstd1.php"); } } } Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted July 8, 2013 Share Posted July 8, 2013 What errors are you getting? Note: the var_dump() function was added to the expression portion of the third if statement. It needs to go after the curly bracket. if($sql=$db->query("INSERT INTO `kafala`.`std_basic` (`fname` ,`sname` ... '".es("std_siblings")."', '".es("std_mo3arrif")."')")); var_dump($sql); { Also, you should probably review the manual for the header() function. http://php.net/manual/en/function.header.php Remember that header() must be called before any actual output is sent... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.