Jump to content

Problems with submitting


WAMFT1

Recommended Posts

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!";
}
}
?>
Link to comment
https://forums.phpfreaks.com/topic/282553-problems-with-submitting/
Share on other sites

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.

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.