acroporas Posted September 30, 2006 Share Posted September 30, 2006 Can you see what's up with this?Even when I enter the correct username and password, the script does not jump pass the form.[code]<?phpsession_start();if ( $POST['login'] == "iamme" && $_post['pasword'] == "saysme" ) $_SESSION['logged'] = "yes";if ( $_SESSION['logged'] != "yes" ){?><html><head><title>Login</title></head><body><form action="index.php" method="post" > <p style="margin-top: 0; margin-bottom: 0"><b><font size="4">Domain.com</font></b></p> <p style="margin-top: 0; margin-bottom: 0">Login in to access admin page.</p> <?php if ( ( $_POST["login"] != "iamme" && $_POST["login"] ) || ( $_POST["pasword"] != "saysme" && $_POST["pasword"] ) ) echo '<p style="margin-top: 0; margin-bottom: 0">Username or password was incorrectly entered.</p>';?> <p> </p> Login: <input type="text" name="login" size="20"></p> Password: <input type="password" name="pasword" size="20"></p> <p> </p> <p><input type="submit"></p></form></body></html><?phpdie("");}?>password was good.[/code] Quote Link to comment Share on other sites More sharing options...
alpine Posted September 30, 2006 Share Posted September 30, 2006 You will need to refresh the page one time or move to another page for the session to be readable, same thing as with cookies Quote Link to comment Share on other sites More sharing options...
Gaoshan Posted September 30, 2006 Share Posted September 30, 2006 By "jump pass the form" do you mean you want the form to load some other page and it doesn't or do you want the form to reload the same page and it doesn't? Not clear what you want to do. ??? Quote Link to comment Share on other sites More sharing options...
acroporas Posted September 30, 2006 Author Share Posted September 30, 2006 [quote author=alpine link=topic=110039.msg444104#msg444104 date=1159592601]You will need to refresh the page one time or move to another page for the session to be readable, same thing as with cookies[/quote]I tryed it where it moves to new page, still does not work. Quote Link to comment Share on other sites More sharing options...
acroporas Posted September 30, 2006 Author Share Posted September 30, 2006 [quote author=Gaoshan link=topic=110039.msg444105#msg444105 date=1159592764]By "jump pass the form" do you mean you want the form to load some other page and it doesn't or do you want the form to reload the same page and it doesn't? Not clear what you want to do. ???[/quote]overview of codeIf ( $_session['login']!=yes ){display login pagesubmit goes back to same page}else "password was good"The problem is that even when the password is good, it still shows the login page. Quote Link to comment Share on other sites More sharing options...
acroporas Posted September 30, 2006 Author Share Posted September 30, 2006 Ok I found the problem. $POST != $_POSTDuh... 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.