How to avoid duplication entry via form into database
- by DAFFODIL
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("form", $con);
$reb = "select count(*) from customer where name = '$name';"
if (mysql_result($reb,0) > 0) {
echo "Item Already Added!<br>";
} else {
// add the item
}
mysql_close($con);
header( 'Location: http://localhost/cus.php' );
?>
Parse error: parse error in C:\wamp\www\c.php on line 10