The password in my mysql database had been encrypted into *E4BBEE5220DE7AC6338B93A1
so, when i try do the userlogin page it make my user authorization page can't really authorise the user becoz of the password matters...how do i encrypt the data using php4.4.0??Plz hv a look on my code is thr any error??thx a lot!!
here's the code of user login:
<wml>
<card title="Login">
<p>Welcome Guest!</p>
Username:<br/>
<input name="word" type="text" maxlength="25"/><br/>
Password:<br/>
<input name="password" type="password" maxlength="25"/><br/>
<anchor>
<go method="post" href="do_authuser.php">
<postfield name="word" value="$(word)"/>
<postfield name="password" value="$(password)"/>
</go>
Login
</anchor>
<br/>
</card>
</wml>[/COLOR]
here's the code to authorise user:
<wml>
<card>
<?php
if(($_POST["word"]=="") ||($_POST["password"]=="")){
echo '<small>You have not filled up the form completely</small>';
exit;
}
$db_name="translation";
$table_name="auth_users";
$connection=@mysql_connect("localhost", "root", "") or die(mysql_error());
$db=@mysql_select_db($db_name, $connection) or die(mysql_error());
$result=@mysql_query('select username,password from auth_users where
username=("'.$_POST["word"].'") and
$num=mysql_num_rows($result);
if($num != 0){
echo "Congratulations, you're authorized!";
exit;
}
echo "you hv not authorise";
?>
</card>
</wml>[/COLOR]