How to aviod duplication entry via form into database
Posted
by DAFFODIL
on Stack Overflow
See other posts from Stack Overflow
or by DAFFODIL
Published on 2010-03-30T19:02:57Z
Indexed on
2010/03/30
19:13 UTC
Read the original article
Hit count: 351
php
<?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
© Stack Overflow or respective owner