• Log in or sign up for an account here: https://www.sythe.org/login

Need help with some PHP/MYSQL code

fighter1431

Forum Addict
Joined
Feb 21, 2007
Sythe Gold
0
Messages
418
Hi everyone.

I have some code that checks a password to login to a website but somehow I get an error and I don't know what causes it.

This is the code.
Code:
$object=mysql_fetch_object($query)
$passwordcheck=$object->password;
if (isset($passwordcheck))
{$check="This Email-Adres does not exist in the ERS Database;}

I get this error.


Parse error: parse error, expecting `'}'' in C:\wamp\www\testers 2.10\logintest.php on line 25

I checked and there is no error in another part then this.

Any suggestions would be usefull =)
 
There's no ending quote ( " ) at the end of your string. Usually parse errors are caused by incorrect amounts of quotation marks, brackets, braces, and other enclosing symbols.

Code:
$object=mysql_fetch_object($query)
$passwordcheck=$object->password;
if (isset($passwordcheck))
{$check="This Email-Adres does not exist in the ERS Database";}
 
Well, this is what I think:

PHP:
$object=mysql_fetch_object($query);
$passwordcheck=$object->password;
if (isset($passwordcheck))
{$check="This Email-Adres does not exist in the ERS Database";}
 
See above.

Also, not an actual error, but why are you using isset()? In your if() statement, isset() will always return true because you just gave it a value the line before...

http://us3.php.net/isset
 
Runescape Gamblingrunescape gambling
Back
Top