sabsin Posted March 10, 2008 Share Posted March 10, 2008 Hi ! i'm facing the string error in my inquiry form -------------------------------------------------- Parse error: syntax error, unexpected T_STRING in /home/ezines/public_html/savefeedback.php on line 19 ------------------------------------------------------------------------------ below is the code <?php ob_start(); echo "<pre>"; print_r($_POST); $con = mysql_connect("localhost","ezines_india","ezines123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("ezines_inquiry",$con); mysql_query("INSERT INTO ezines_inquiry VALUES ('".$_POST['name']."', '".$_POST['address']."','".$_POST['phone']."','".$_POST['email']."','".$_POST['comments']."')"); $msg = "Thank You for Your Inquiry.\n\nWe will get back to you shortly.\n\nWith Best Regards\nSaba"; mail($_POST['email'],"Inquiry Mail",$msg); $msg = "Name : ".$_POST['name']."\nAddress : ".$_POST['address']."\nPhone : ".$_POST['phone']."\nEmail : ".$_POST['email']."\nComments : ".$_POST['comments']; mail("[email protected]","Inquiry Mail",$msg) mysql_close($con); header("Location: thanks.php"); ?> ------------------------------------------------------------ I can't figure out the problem... help pls cheers Sabs Link to comment https://forums.phpfreaks.com/topic/95458-parse-error-syntax-error-unexpected-t_string-in-homeezinespublic_htmlsavef/ Share on other sites More sharing options...
frijole Posted March 10, 2008 Share Posted March 10, 2008 <?php ob_start(); echo " "; print_r($_POST); $con = mysql_connect("localhost","ezines_india","ezines123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("ezines_inquiry",$con); mysql_query("INSERT INTO ezines_inquiry VALUES ('".$_POST[ 'name']."', '".$_POST['address']."','".$_POST['phone']."','".$_POST['email']."','".$_POST['comments']."')"); $msg = "Thank You for Your Inquiry.\n\nWe will get back to you shortly.\n\nWith Best Regards\nSaba"; mail($_POST['email'],"Inquiry Mail",$msg); $msg = "Name : ".$_POST['name']."\nAddress : ".$_POST['address']."\nPhone : ".$_POST['phone']."\nEmail : ".$_POST['email']."\nComments : ".$_POST['comments']; mail("[email protected]","Inquiry Mail",$msg) mysql_close($con); header("Location: thanks.php"); ?> Link to comment https://forums.phpfreaks.com/topic/95458-parse-error-syntax-error-unexpected-t_string-in-homeezinespublic_htmlsavef/#findComment-488676 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.