Posted by Sjoerd on 02/11/06 12:23
> So how would I write something that is conditional to test if the name
> exsits in the database before allowing me to write to the various
> tables. Any help appreciated.
$query1 = "SELECT * FROM `$table` WHERE username='$username'";
$query1_results = mysql_query($query1) or die("Query Failed");
if (mysql_num_rows($query1_results) > 0) {
echo "User already exists.";
}
Navigation:
[Reply to this message]
|