Page 1 of 1

More errors

Posted: Thu Jun 09, 2011 5:27 am
by Thomar
Once again I'm having errors with the code. I just finished vid 3b and this is the error i got

( ! ) Parse error: syntax error, unexpected ')' in E:\wamp\www\Tutorial\reguser.php on line 22

This is my code for that section

$isplayer="SELECT * from players where name='$player'");
$isplayer2=mysql_query($isplayer) or die ("Could not query players table");
$isplayer3=mysql_fetch_array($isplayer2);

if (!$_POST['password'] || !$POST['pass2])
{
echo "You did not enter a password<br>";
echo " <A href='register.php'>Go back<a/>";
exit;
}

Appreciate any input

Re: More errors

Posted: Thu Jun 09, 2011 5:33 am
by Zak Zillion

Code: Select all

$isplayer = ("SELECT * from players where name='$player'");
$isplayer2 = mysql_query($isplayer) or die("Could not query players table");
$isplayer3 = mysql_fetch_array($isplayer2);

if (!$_POST['password'] || !$_POST['pass2']) {
    echo "You did not enter a password<br>";
    echo "<A href='register.php'>Go back<a/>";
    exit;
}
Just a few little things. You might want to slow down when you right your code.

Re: More errors

Posted: Fri Jun 10, 2011 3:09 pm
by hallsofvallhalla
yep

remove the )

so it should be

Code: Select all

$isplayer="SELECT * from players where name='$player'";