Page 1 of 1

[SOLVED]

Posted: Fri Jan 20, 2012 7:30 pm
by Hattrick

Code: Select all

if ($password==$pass2)
{

$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'))   // This is line 27
{
print "You did not enter a password!<br>";
echo "<A href='register.php'>Go Back</a";
exit;
In this piece of code, I get this error when I try to run it:

( ! ) Fatal error: Function name must be a string in C:\wamp\www\Tutorial\Reguser.php on line 27
Call Stack
# Time Memory Function Location
1 0.1344 696704 {main}( ) ..\Reguser.php:0

Re: WOW... I'm a noob...

Posted: Fri Jan 20, 2012 7:47 pm
by Sebastian
i hand`n a clue about php 3 months ago, but i was thinking and i think it should be:
if(!$_POST['password'] || !$_POST['pass2'])

just an idea...

Re: WOW... I'm a noob...

Posted: Fri Jan 20, 2012 7:58 pm
by Hattrick
Thanks a ton it works! :D

Re: WOW... I'm a noob...

Posted: Fri Jan 20, 2012 7:59 pm
by Jackolantern
Yes, they need to be square braces, and you also need to close your IF statement if you didn't with a matching } at the end.