WAMFT1 Posted September 30, 2013 Share Posted September 30, 2013 Hi, I have been trying to get this piece of coding to submit my form after checking but it keeps going to a 500Error. I have spent so long trying to work it out that now I am confused on what works and what doesn't. Can someone please help with where I am going wrong. <?php if(isset($_POST['Submit'])){ $DateUploaded = protect($_POST['DateUploaded']); $AdviserCode = protect($_POST['AdviserCode']); $DocName = protect($_POST['DocName']); $URL = protect($_POST['URL']); $ImageType = protect($_POST['ImageType']); $Current = protect($_POST['Current']); $css_class = protect($_POST['css_class']); if(!$ImageType || !$DocName){ echo "<center>You need to fill in all of the required filds!</center>"; }else{ $res = mysql_query ("INSERT INTO `adocs_cpd` (`DateUploaded`, `AdviserCode`, `DocName`, `URL`, `ImageType`, `Current`, `css_class`) VALUES ('".$DateUploaded."','".$AdviserCode."','".$DocName."','".$URL."','".$ImageType."','".$Current."','".$css_class."')"); echo "Saved!"; } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/282553-problems-with-submitting/ Share on other sites More sharing options...
mac_gyver Posted September 30, 2013 Share Posted September 30, 2013 a http 500 respons for a php script usually means a fatal parse or a fatal runtime error, but php's error_reporting/display_errors are not set to show all errors. when developing and debugging php code, you must have php's error_reporting set to E_ALL and display_errors set to ON, in your php.ini, so that php will help you. Quote Link to comment https://forums.phpfreaks.com/topic/282553-problems-with-submitting/#findComment-1451830 Share on other sites More sharing options...
mac_gyver Posted September 30, 2013 Share Posted September 30, 2013 (edited) also, your thread has absolutely nothing to do with the Regex forum section that you posted it in. moving thread to the php help section... edit: i also notice you previously posted a thread in the Regex forum that had to be moved. are you a bot script or a real person? Edited September 30, 2013 by mac_gyver Quote Link to comment https://forums.phpfreaks.com/topic/282553-problems-with-submitting/#findComment-1451834 Share on other sites More sharing options...
WAMFT1 Posted September 30, 2013 Author Share Posted September 30, 2013 I am a real person not a bot script. Not always sure where to post these kind of issues. Quote Link to comment https://forums.phpfreaks.com/topic/282553-problems-with-submitting/#findComment-1451878 Share on other sites More sharing options...
Solution WAMFT1 Posted September 30, 2013 Author Solution Share Posted September 30, 2013 Don't worry, I have managed to sort out why this didn't work. All good now. Quote Link to comment https://forums.phpfreaks.com/topic/282553-problems-with-submitting/#findComment-1451968 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.