D
Drew
Guest
Why does this take 2 times in the database to return username unavailable?
while($row = mysql_fetch_array( $result ))
{
if ($row['username']==$_POST[newusername])
$taken=1;
}
if ($taken==1)
{
echo "username unavailable";
}
I have a HTML form submitting to this using POST. This should get all of the arrays inside of my example database and check it with the username the user typed in, and display 'username unavailable' if it finds a match. For some reason, I have to submit the name twice before it realizes that the username is already taken. What's the deal?
nevermind!
I just wasn't refreshing my form before I re-submitted it. how stupid, lol
So anyways.
Anyone wanna tell a good joke =]
while($row = mysql_fetch_array( $result ))
{
if ($row['username']==$_POST[newusername])
$taken=1;
}
if ($taken==1)
{
echo "username unavailable";
}
I have a HTML form submitting to this using POST. This should get all of the arrays inside of my example database and check it with the username the user typed in, and display 'username unavailable' if it finds a match. For some reason, I have to submit the name twice before it realizes that the username is already taken. What's the deal?
nevermind!
I just wasn't refreshing my form before I re-submitted it. how stupid, lol
So anyways.
Anyone wanna tell a good joke =]