Jump to content

unexpected end of file


Pavlin24

Recommended Posts

Hallo,

what might mean this message of error:

 

"Parse error: syntax error, unexpected end of file in /home/pavlinan/public_html/mes.php on line 22"

 

 

Here is the code:

 

<?php$email = $_POST["meil"];$message = $_POST["area"];$ime= $_POST["ime"];echo "From: ".$_POST["ime"]."<br>";echo "Email: ".$_POST["meil"]."<br>";echo $_POST["area"]."<br>";// Create connection$con=mysql_connect("localhost","pavlinan_db","mishon24");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("pavlinan_backform");mysql_query("INSERT INTO `backform` (`name` , `email` , `text` )VALUES (`$ime`, `@email`, `$message`)`,$con);mysql_close($con);?>

Link to comment
Share on other sites

The string in mysql_query is unclosed. If you had a syntax higlighter it would be very clear:

 

 

mysql_query("INSERT INTO `backform` (`name` , `email` , `text` )VALUES (`$ime`, `@email`, `$message`)`,$con);mysql_close($con);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...