Jump to content

PHP get with no variable set


tomhoad

Recommended Posts

Hi

 

I would like to do some error reporting using GET. For example I have:

 

The URL: www.example.com/index.php?st=not_registered

 

$st = mysql_real_escape_string($_GET['st']);
if ($st = "not_registered") {echo "<p>You are not already registered!</p>";}
if ($st = "already_registered") {echo "<p>That email is already registered!</p>";}
if ($st = "login_fail") {echo "<p>You are not registered! Please enter your email below.</p>";}

 

However, that seems to ignore the value of $st and just print all the options?

 

Thank you for your help.

Link to comment
https://forums.phpfreaks.com/topic/190043-php-get-with-no-variable-set/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.