<?
$result = mysql_query("SELECT * FROM Arrowsmithowner WHERE arrowsmith1 = '$name'") or die(mysql_error());
$rows = mysql_num_rows($result);
if($rows == 0)
{
mysql_query("INSERT INTO Arrowsmithowner SET id='$id', name='$name', arrowsmith1='$name'")
or die(mysql_error());
echo "You now own this property!";
}
else
{
echo "This property allready belongs to some one else!";
}
?>
The issue is, when another account clicks the pick up property butten my database just creates another row and 2 people can own it.
Full Texts id name arrowsmith1 arrowsmith2 arrowsmith3 arrowsmith4
Edit Delete 3025 Darrken Darrken
Edit Delete 3023 Hopeless Hopeless

New Topic/Question
Reply
MultiQuote









|