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("ansari_saba@yahoo.co.in","Inquiry Mail",$msg) mysql_close($con); header("Location: thanks.php"); ?> ------------------------------------------------------------ I can't figure out the problem... help pls cheers Sabs Quote Link to comment 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("ansari_saba@yahoo.co.in","Inquiry Mail",$msg) mysql_close($con); header("Location: thanks.php"); ?> 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.