Hello ,
I am Bibin John, fromKerala. I have seen you in a facebook group 'Php Developers in KERALA'
This mail is regarding an issue ,that i am facing with php. I have a php website In this site there is a feedback form, when I submit that form It shows an error like this,:
Parse error: syntax error, unexpected T_STRING in /home/tecwand/public_html/contact.php on line 1
I am using cpanel accelerated hosting , PHP5.2.8. I think the problem with this version. My friend using 5.2.6 in cpanel, but no problem with the same PHP script that I used!
Below I mentioned the PHP script I used , Can you make its syntax suitable for php 5.2.8 ?
<?php
$name=$_REQUEST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
$con=mysql_connect("localhost","root","");
mysql_select_db("tecwand",$con);
$ins="insert into comments values('$name','$email','$comment')";
mysql_query($ins);
echo"inserted";
?>
Parse error: syntax error, unexpected T_STRING in /home/tecwand/public_html/contact.php on line 1
I am using cpanel accelerated hosting , PHP5.2.8. I think the problem with this version. My friend using 5.2.6 in cpanel, but no problem with the same PHP script that I used!
Below I mentioned the PHP script I used , Can you make its syntax suitable for php 5.2.8 ?
<?php
$name=$_REQUEST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
$con=mysql_connect("localhost","root","");
mysql_select_db("tecwand",$con);
$ins="insert into comments values('$name','$email','$comment')";
mysql_query($ins);
echo"inserted";
?>
Hope that you will help me!
Kindly make replay to this e mail address!
Thanks and Regards,
Bibin John
1 comments
it could happen for wrong file encoding. Some editors save docs with UTF8+BOM.
Use "Save as..." and check if there's an option to save the file with utf8 without BOM.
Post a Comment
Please put your comments here. your questions, your suggestions, also what went wrong with me.