I have copied the following script from a demo on this forum, and I am getitng an error when running it,
"Parse Error, unexpected $ in \path\to\doc on line 70"
There is no $ on line 70, here is script
[test2.php]
<html>
<body>
<form method="post" action=insert.php>
First Name: <input type="text" name="first"><br>
Last Name: <input type="text" name="last"><br>
Phone: <input type="text" name="phone"><br>
Mobile: <input type="text" name="mobile"><br>
Fax: <input type="text" name="fax"><br>
E-mail: <input type="text" name="email"><br>
Web: <input type="text" name="web"><br>
<input type="Submit">
</form>
</body>
</html>
[insert.php]
<html>
<body>
<?
mysql_connect('localhost','root');
@mysql_select_db(database) or die( "Unable to select database");
$first=$POST['first'];
$last=$POST['last'];
$phone=$POST['phone'];
$mobile=$POST['mobile'];
$fax=$POST['fax'];
$email=$POST['email'];
$web=$_POST['web'];
mysql_connect('localhost','root');
@mysql_select_db(database) or die( "Unable to select database");
$query = "INSERT INTO contacts VALUES ('','$first','$last','$phone','$mobile','$fax','$e
mail','$web')";
mysql_query($query);
$query="SELECT * FROM contacts";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Database Output</center></b><br><br>";
$i=0;
while ($i < $num) {
$first=mysql_result($result,$i,"first");
$last=mysql_result($result,$i,"last");
$phone=mysql_result($result,$i,"phone");
$mobile=mysql_result($result,$i,"mobile");
$fax=mysql_result($result,$i,"fax");
$email=mysql_result($result,$i,"email");
$web=mysql_result($result,$i,"web");
echo "<b>$first $last</b><br>Phone: $phone<br>Mobile: $mobile<br>Fax: $fax<br>E-mail: $email<br>Web: $web<br><hr><br>";
++$i;
}
?>
</body>
</html>
Can anyone help please?