purtip3154 Posted December 29, 2007 Share Posted December 29, 2007 Here's the part of the code that I've been having problems with: while (odbc_fetch_row($rs)) { $uname=odbc_result($rs,"Username"); $pword=odbc_result($rs,"Password"); if($_POST["user"] == $uname){ if($_POST["pass"] == $pword){ echo $b1.$hed1."<font color='aqua'>Correct login, what would you like to do next?:</font><br /><ul><li><a href='http://localhost/proj/addre.php'>Check Addresses</a></li><li><a href='http://localhost/proj'>Go Back!</a></li></ul>".$e1; break; }elseif ($_POST["user"] && $_POST["pass"]){ echo $b1.$hed1."<font color='red'><b>Invalid username and/or password!</b></font><br /><br />".$f1.$e1; break; } } } When you type in a correct username, and the incorrect password, it shows the invalid u/p message, but when you type in an incorrect username, and a correct or incorrect password, then it just shows a blank screen. Is there some way to do this that if you have the wrong username, it shows the error message too? Link to comment Share on other sites More sharing options...
kenrbnsn Posted December 29, 2007 Share Posted December 29, 2007 Please don't double post. Locked. Ken Link to comment Share on other sites More sharing options...
Recommended Posts