If You Know PHP Come Here

12/16/2012 23:20 thebook23#1
hello
i have forget password script
but when password changed successfully
i found another password in sql
and account say wrong password when login into website by the new website
Quote:
<?php
require("ayar.php");
ob_start();
if(isset($_POST["forgotpass"])){
if($kullanici==!""){
header("Location: LimitedAccess.php");
}
$forgotname = anti_injection($_POST["pirroadusername"]);
$forgotmail = anti_injection($_POST["pirroademail"]);
$forgotgz = anti_injection($_POST["pirroadgz"]);
$forgotpw = anti_injection($_POST["pirroadnewpw"]);
$forgotpwt = anti_injection($_POST["pirroadnewpwt"]);
$sifremd5 = md5($pirroadnewpwt);
$emailara = @mssql_query("SELECT * FROM dbo.TB_User WHERE StrUserID = '$forgotname'");
$emailbul = @mssql_fetch_array($emailara);
$pirmail = $emailbul["Email"];
$pirgz = $emailbul["address"];
if($forgotname == "" || $forgotmail == "" || $forgotgz == "")
{
echo "<div class='bilgi-pirroad hata'>Bo‏ alan b‎rakmay‎n !</div>";
}
else if($pirmail != $forgotmail)
{
echo "<div class='bilgi-pirroad hata'>Yazd‎ً‎n‎z E-mail Adresi Yazd‎ً‎n‎z Kullan‎c‎ya Ait Deًildir!</div>";
}
else if($pirgz != $forgotgz)
{
echo "<div class='bilgi-pirroad hata'>Yazd‎ً‎n‎z Gizli Yan‎t Yazd‎ً‎n‎z Kullan‎c‎ya Ait Deًildir!</div>";
}
else if($forgotname == "0")
{
echo "<div class='bilgi-pirroad hata'>Bِyle Bir Kullan‎c‎ Bulunamad‎!</div>";
}
else if($pirmail == "0")
{
echo "<div class='bilgi-pirroad hata'>Yazd‎ً‎n‎z Kullan‎c‎ya Ait E-mail Adresi Bo‏tur.Yetkililerle فleti‏ime Geçin!</div>";
}
else if($pirgz == "0")
{
echo "<div class='bilgi-pirroad hata'>Yazd‎ً‎n‎z Kullan‎c‎ya Ait Gizli Yan‎t Bo‏tur.Yetkililerle فleti‏ime Geçin!</div>";
}
else if($forgotpw != $forgotpwt)
{
echo "<div class='bilgi-pirroad hata'>Yeni قifre Ve Yeni قifre Tekrar‎ Uyu‏muyor.Yeniden Deneyin...</div>";
}
else if(strlen($forgotpw) <= "3" || strlen($forgotpw) >= "21")
{
echo "<div class='bilgi-pirroad hata'>قifreniz 4 karakterden k‎sa veya 20 karakterden uzun olamaz..!</div>";
}
else
{
$changegz = @mssql_query("UPDATE dbo.TB_User SET password = '$sifremd5' WHERE StrUserID = '$forgotname'");
if($changegz)
{
echo "<div class='bilgi-pirroad tamamlandi'>Yeni قifreniz Ba‏ar‎yla Güncellendi...</div>";
}
else
{
echo "<div class='bilgi-pirroad hata'><b>ف‏lem s‎ras‎nda bir hata olu‏tu</div></b>";
}
}
}
?>



<form action="" method="post">
<div class="form_element">
<div class="textfield">Kullan‎c‎ Ad‎n‎z:&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" class="textfield_regform" name="pirroadusername" id="pirroadusername" value="Kullan‎c‎ Ad‎ ( hesap ad‎ )" onFocus="javascript: if(this.value=='Kullan‎c‎ Ad‎ ( hesap ad‎ )') this.value=''" onBlur="javascript: if(this.value=='') this.value='Kullan‎c‎ Ad‎ ( hesap ad‎ )'" /></div><br />
</div>
<div class="textfield">E-mail Adresi:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;< input type="text" class="textfield_regform" name="pirroademail" id="pirroademail" value="Hesaba Ait E-mail Adresi" onFocus="javascript: if(this.value=='Hesaba Ait E-mail Adresi') this.value=''" onBlur="javascript: if(this.value=='') this.value='Hesaba Ait E-mail Adresi'" /></div><br />

<div class="textfield">Gizli Yan‎t‎n‎z:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;<input type="text" class="textfield_regform" name="pirroadgz" id="pirroadgz" value="Hesaba Ait Gizli Yan‎t" onFocus="javascript: if(this.value=='Hesaba Ait Gizli Yan‎t') this.value=''" onBlur="javascript: if(this.value=='') this.value='Hesaba Ait Gizli Yan‎t'" /></div><br />

<div class="textfield">Yeni قifre:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<inp ut type="password" class="textfield_regform" name="pirroadnewpw" id="pirroadnewpw" value="Sifre" onFocus="javascript: if(this.value=='Sifre') this.value=''" onBlur="javascript: if(this.value=='') this.value='Sifre'" /></div><br />

<div class="textfield">Yeni قifre (Tekrar):<input type="password" class="textfield_regform" name="pirroadnewpwt" id="pirroadnewpwt" value="Sifre" onFocus="javascript: if(this.value=='Sifre') this.value=''" onBlur="javascript: if(this.value=='') this.value='Sifre'" /></div><br />


<div class="form_element" id="kaydet">
<br><input type="submit" class="btn primary" name="forgotpass" value="Güncelle!" style="margin-left:30px">
</div>

</form>
can any one help me ?
sorry for bad english ! :mad:
12/17/2012 00:10 djfisring#2
You should have written "If You Know PHP and turkish Come Here"
But lets see, you dont get the md5 pw written to your db or what?

How does your password look like, try writing password as the new pw and show us the pw you get from the db.
12/17/2012 12:25 Zodiao#3
Prolly, u didn't define it to MD5.
btw i dont know turkish and few wont understand this.
12/17/2012 18:10 thebook23#4
i am changed the password
but the new password is : d41d8cd98f00b204e9800998ecf8427e
and my password must be this : 6cb9853b568a8830bb1c54a04f236c99

Up Up Up
12/20/2012 13:12 thebook23#5
#Request to close
Fixed