md5 problem with input Field
Posted: Sat Aug 20, 2011 9:52 pm
Hi everyone
my problem is :
i have 3 input field 1- username, 2- pass, 3- repass
so i want to edit my username only , and when i edit my username also my pass edit automatically because my input field is empty
and with md5 make the encrypt to empty field
this is the code :
can anyone solve my problem
Thanx in advance
my problem is :
i have 3 input field 1- username, 2- pass, 3- repass
so i want to edit my username only , and when i edit my username also my pass edit automatically because my input field is empty
and with md5 make the encrypt to empty field
this is the code :
Code: Select all
<form action="empty.php" method="post">
<input type="password" name="pass" /><br />
<input type="password" name="repass" /><br />
<input type="submit" name="submit" />
</form>
<?php
if(isset($_POST['submit'])){
$pass = md5($_POST["pass"]);
$repass = md5($_POST["repass"]);
if ((strlen(trim(!empty($pass))) > 0) and (strlen(trim(!empty($repass))) > 0)) {
//if (isset($pass) and isset($repass)){
echo"Not empty <br />";
echo $pass."<br />";
echo $repass."<br />";
}else{
echo"Empty";
}
}
?>
Thanx in advance