forgotpass.php yardım lütfen..
Arkadaşlar elimde bir script var ve içerisinde forgotpass.php dosyası var ancak forgotpass.html yok. Ben forgotpass.html oluşturdum ancak içerisine bu php kodlarına uygun olarak html kodlarını yazamadım. Yani password tekrar email gönderme için gerekli kodları bulamadım.
HTML de,
<form action="forgotpass.php" method="post" >
<input ... >
Gibi denedim olmadı.
Bu PHP kodlarına göre html e nasıl ve ne yazmam gerekiyor. Şimdiden çok teşekkür ederim.
<?
include("header.php");
$error = $diplay = "";
if(isset($_POST['sendmepass']))
{
$mem_email = $affiliater->GetEmailByUsername($_POST['affiliatername']);
if ($mem_email != "")
{
$newpass = generatePassword();
$affiliater->ReminderPassword($_POST['affiliatername'], $newpass);
//Send mail
$to = $mem_email;
$subject = 'Password Reminder';
$body = str_replace("{USERNAME}", $_POST['affiliatername'], FORGOTMAILDETAIL);
$body = str_replace("{NEWPASSWORD}", $newpass, $body);
$headers = "Content-Type: text/html; charset=iso-8859-1\n";
mail($to, $subject, $body, $headers);
$error = "Your password will be e-mailed to you at the e-mail address you registered with the system! Please check it to recovery your password";
$diplay = "style='display: none;'";
}else
$error = "User inactive or not exists! Please type exactly affiliatername which you used to registry";
}
$template->set_filenames(array("body" => "forgotpass.html"));
$template->assign_vars(array(
'ERROR' => $error,
'DIPLAY' => $diplay,
'USERNAME'=> "Username",
));
$template->pparse("body");
include("footer.php");
?>
Php
$_POST['affiliatername']
buna benzer POST değişkeni sana yol gösterir.html içine aşağıdakini eklersin.
<form action="forgotpass.php" method="post" >
Kullancı ad: <input type="text" name="affiliatername">
<input ... >
Php
Hocam cevabın için çok teşekkür ederim, ancak maalesef olmadı.
Şu şekilde yazıyorum, nerede yanlışlık var bulamadım, Tekrar çok teşekkür ederim.
<form action="forgotpass.php" method="post">
Kullancı adı: <input type="text" name="affiliatername"/>
<input type="submit" value="New Password" name="sendmepass" class="button"/>
</form>
Php
hedef.php
<?php
echo $_POST['affiliatername'];
?>
acaba gelen bir bilgi var mı ?
Php
Bu arada satır sonlarında /> olması sorun çıkarabilir. img ile dahi bunu kullanmaya gerek yok.
Form için şunu dene:
<form action="hedef.php" method="post" enctype="multipart/form-data">
</form>
Php
<form action="forgotpass.php" method="post" enctype="multipart/form-data">
<input style="opacity:0.9" class="sidelinks5" size="30" maxlength="50" placeholder="email adress" type="email" name="sendmepass"/>
<input type="submit" value="New Password" name="affiliatername" class="button"/>
</form>
Bu şekilde yazıyorum kodu ancak olmuyor.
Gelen herhangi bir bilgi de yok maalesef. Tekrar çok teşekkürler ilginizden dolayı..