[SOLVED]

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
Hattrick
Posts: 38
Joined: Tue Jan 17, 2012 1:11 am

[SOLVED]

Post 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
Last edited by Hattrick on Fri Jan 20, 2012 8:03 pm, edited 1 time in total.
Image
Sebastian
Posts: 31
Joined: Sun Dec 11, 2011 8:21 pm

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

Post 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...
Hattrick
Posts: 38
Joined: Tue Jan 17, 2012 1:11 am

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

Post by Hattrick »

Thanks a ton it works! :D
Image
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

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

Post 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.
The indelible lord of tl;dr
Post Reply

Return to “Beginner Help and Support”