How to fetch md5 password from database. i am making a login form> i want,when the user is going to login.if the username and password text field is matched with database than use will login.
database.. in database,i store the password with md5(). now how to fetch the password from database.and how to make validation with this. thanks all
<h1>Login Here</h1>
<form name="f1" action="login.php" method="post">
<table border="1">
<tr><td>username</td><td><input type="text" name="t1"></td></tr>
<tr><td>password</td><td><input type="password" name="t2"></td></tr>
<tr><td><input type="submit" value="login"></td></tr>
</table>
</form>
login.php
<?php
include "db.php";
$user=$_POST['t1'];
$pass=$_POST['t2'];
$result=mysql_query("select * from core where username='$user'")or die(mysql_error());
$row=mysql_fetch_row($result);
?>
<h1>Welcome Mr. <?php echo $user;?></h1>
<table border="1">
<tr><td>Your User-Id :- </td><td><?php echo $row[0];?></td></tr>
<tr><td>Your Username: </td><td><?php echo $row[1];?></td></tr>
<tr><td>your md5 Password: </td><td><?php echo $row[2];?></td></tr>
<tr><td>your Email Id: </td><td><?php echo $row[3];?></td></tr>
</table>