Hide password

A

Anonymous

Guest
How to hide the password that display in the address bar? Every time I login, it will show the username and password, it's OK to show the username but not password. The problem is 'http://localhost/verify1.php?username=manager&password=manager'. Thank you.




<?php setcookie("username"); ?>
<?
setcookie("username", $username);
if ($username ==NULL && $password ==NULL)
{
echo"<br><br><br><font size = 4 color = #003366><center>Please Try Again!!!<br><br><br>";
echo"NO Username & Password<br><br><br>";
echo "Click <a href=\"login1.php\">here</a> to try again !!<br>";
}
else
{
$Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$check == 0;
$result=mysql_query("select * from account1");
$number_of_rows = mysql_num_rows($result);
$i=0;
$check=0;
while ($number_of_rows != 0)
{
$row = mysql_fetch_row($result);
$number_of_rows--;
if ($username==$row[0] && $password==$row[1])
{
echo"<br><br><br><font size = 4 color = #003366><center>Congratulations !!<br><br>";
echo "Hello!! <b>$username</b><br><br>";
echo"You had access HELP INSTITUTE website<br><br><br>";
echo "Click <a href=\"welcome1.php\">here</a> to CONTINUE !!<br>";
$check=1;
break;
}
}
if ($check == 0)
{
echo"<br><br><br><font size = 4 color = #003366><center>Please Try Again!!!<br><br><br>";
echo"Wrong Username OR Password<br><br><br>";
echo "Click <a href=\"login1.php\">here</a> to try again !!<br>";
}
}
?>
 
hide the username and password inside session variables. :wink:
 
Can't you just use the post method for your form instead of the get, or am I missing something obvious??
 
Back
Top