April 30th, 2013, 08:33 AM
Parse error-unexpected end of file line 28
Hi can someone check this code and tell me how to fix it, cannot figure out where the error is.
$db = mysql_connect("localhost", "root","LaTorre1937##");
$sql = "INSERT INTO personnel (firstname, lastname, nick, email, salary)
$result = mysql_query($sql);
echo "Thank you! Information entered.\n";
<form method="post" action="input.php">
First name:<input type="Text" name="first"><br>
Last name:<input type="Text" name="last"><br>
Nick Name:<input type="Text" name="nickname"><br>
E-mail:<input type="Text" name="email"><br>
Salary:<input type="Text" name="salary"><br>
<input type="Submit" name="submit" value="Enter information"></form>
April 30th, 2013, 08:41 AM
Please post your code in code tags so it's readable.
Unexpected end means the PHP interpreter was expecting a } and didn't find one. The likely reason in this case is that you used a short opening tag ( <? ) before your last } and your configuration is not setup to allow short_open_tags.
Comments on this post
I ♥ ManiacDan & requinix
This is a sig, and not necessarily
a comment on the OP:
don't be a help vampire