subha rr Posted December 16, 2008 Share Posted December 16, 2008 Hi...Below the code<?phpinclude "pass.php";session_start();$user = isset($_POST['user']) ? $_POST['user'] : $_SESSION['user'];$pass = isset($_POST['pass']) ? md5($_POST['pass']) : $_SESSION['pass'];mysql_query("insert into login('', '$user', '$pass')");$link = mysql_connect($hostname, $username, $password);if($link){ $db = mysql_select_db("time", $link);}$sql = "select * from login where username = '$user' and password = password('$pass')";$result2 = mysql_query($sql);if(!isset($pass) || !isset($user)){ if($result2) {?> <form method=POST action=""> <div align=center >Enter login details</div><br> <table align = center> <tr><td>Username</td><td><input type=text name=user value=""> <tr><td>Password</td><td><input type=password name=pass value=""> <tr><td><input type=submit value="Submit"></td></tr> </table> </form><?php }}else if($result2 != 'pass'){ echo "<font>Authentication Failed</font>";}?>issue for this code for password is correct or incorrect, the result will be occured Authentication failed..What is the issue for this code?pls help..regardssubha Link to comment Share on other sites More sharing options...
Ache Posted December 18, 2008 Share Posted December 18, 2008 if(!isset($pass) || !isset($user)){if($result2){ This should be }Don't know if it is the only problem. But at least it is something Link to comment Share on other sites More sharing options...
Ache Posted December 18, 2008 Share Posted December 18, 2008 if(!isset($pass) || !isset($user)){if($result2){ <-- This should be }Don't know if it is the only problem. But at least it is something Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.