Jump to content

Parse error: syntax error, unexpected T_STRING in /home/ezines/public_html/savef


sabsin

Recommended Posts

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

<?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");
?>

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.