phpcode Posted January 10, 2008 Share Posted January 10, 2008 I've been using Abyss web server for awhile but changed to Apache and now I've been getting problems with this code: if ($do == "invalid"){ $msg = "Invalid username/password!<br><br><a href='forgot.php'>Forgot your login details? Click here</a>."; } elseif ($do == "logout"){ $msg = "Logged out successfully."; } if (empty($_SESSION['name']) && empty($_SESSION['pass'])){ ShowForm(); } $msg = strip_tags($msg, "<a><br>"); echo $msg; (not the full source) Problem I'm having is it doesn't echo the variable msg but it did echo it when I was using Abyss web server. Apache error log: [Thu Jan 10 17:41:57 2008] [error] PHP Notice: Undefined variable: do in login.php on line 50 Does anyone know why it wont work for Apache but does for Abyss? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted January 10, 2008 Share Posted January 10, 2008 Is the variable $msg set before the <?php if ($do == "invalid"){ ?> If not, that would explain the problem. Ken Quote Link to comment Share on other sites More sharing options...
rlindauer Posted January 10, 2008 Share Posted January 10, 2008 Where is $do defined? Quote Link to comment Share on other sites More sharing options...
phpcode Posted January 10, 2008 Author Share Posted January 10, 2008 Edit: Found the problem. I forgot to put $do = $_GET['do']; Quote Link to comment Share on other sites More sharing options...
rlindauer Posted January 10, 2008 Share Posted January 10, 2008 Ok, where is the value for do coming from? Nevermind Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.