|
|
|
รบกวนที ช่วยดูโค้ด ลืม รหัสผ่านให้หน่อย ใจมากๆๆๆ |
|
|
|
|
|
|
|
ถามแล้วก็เอาโค้ดมาให้ดู ผมดูให้แล้วนะครับ (บอกให้ดูก็ดูเฉยๆ) เพราะไม่มีปัญหาหรือมี Error แจ้งให้ทราบผมก็ไม่รู้จะช่วยยังไงครับ
|
|
|
|
|
Date :
2010-06-02 12:13:04 |
By :
somparn |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?
mysql_connect("localhost","root","root");
mysql_select_db("mydatabase");
$strSQL = "SELECT * FROM member WHERE Username = '".trim($_POST['txtUsername'])."'
OR Email = '".trim($_POST['txtEmail'])."' ";
$objQuery = mysql_query($strSQL);
$objResult = mysql_fetch_array($objQuery);
if(!$objResult)
{
echo "Not Found Username or Email!";
}
else
{
echo "Your password send successful.<br>Send to mail : ".$objResult["Email"];
$strTo = $objResult["txtEmail"];
$strSubject = "Your Account information username and password.";
$strHeader = "Content-type: text/html; charset=windows-874\n"; // or UTF-8 //
$strHeader .= "From: [email protected]\nReply-To: [email protected]";
$strMessage = "";
$strMessage .= "Welcome : ".$objResult["Name"]."<br>";
$strMessage .= "Username : ".$objResult["Username"]."<br>";
$strMessage .= "Password : ".$objResult["Password"]."<br>";
$strMessage .= "=================================<br>";
$strMessage .= "ThaiCreate.Com<br>";
$flgSend = mail($strTo,$strSubject,$strMessage,$strHeader);
}
mysql_close();
?>
Go to : PHP Forgot Lost Password and Sending Password to Mail ทำ Form ลืมรหัสผ่าน ด้วย PHP กับ MySQL
|
|
|
|
|
Date :
2011-07-07 11:15:12 |
By :
thaicreate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|