 |
ผู้รู้ช่วยบอกทีครับ เรื่อง Forgetpassword ครับ กรุณากรอกข้อมูลให้ครบนะคะ , ERROR : Username นี้ไม่มีอยู่ในระบบสมาชิกค่ะ |
|
 |
|
|
 |
 |
|
ลองเพิ่มนี้เข้าไปตอนต้นของ code ดูน่ะครับ
ini_set('sendmail_from', '[email protected]');
|
 |
 |
 |
 |
Date :
2009-12-15 23:09:32 |
By :
debutant |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ให้เพิ่มตรงไหนอ่ะครับ = =
|
 |
 |
 |
 |
Date :
2009-12-15 23:10:44 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$headers = "From: [email protected]"; มันต้องเป็น email ครับ
|
 |
 |
 |
 |
Date :
2009-12-15 23:13:02 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมใส่ตรงนี้อ่าครับ ไม่รู้ถูกอ่ะป่าว
Code (PHP)
} else {
ini_set('sendmail_from', '[email protected]');
$subject = "แจ้งรหัสผ่านของระบบสมาชิก";
$message = "รหัสผ่านของ Username : $user_forget คือ: $password";
$headers = "From: Member ระบบสมาชิก";
ERROR แบบ นี้ ครับ
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\AppServ\www\forgetpassword2.php on line 16
|
 |
 |
 |
 |
Date :
2009-12-15 23:15:19 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อ่อ ครับ
|
 |
 |
 |
 |
Date :
2009-12-15 23:16:06 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
} else {
ini_set('sendmail_from', '[email protected]');
$subject = "แจ้งรหัสผ่านของระบบสมาชิก";
$message = "รหัสผ่านของ Username : $user_forget คือ: $password";
$headers = "From : [email protected]";
ใส่ไปแบบนี้อ่าครับ ก็ยังไม่ได้อ่าคร้าบบ O_o
|
 |
 |
 |
 |
Date :
2009-12-15 23:20:12 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
} else {
ini_set('sendmail_from', '[email protected]'); // ตรงนี้เอาออกซะ มันไม่รู้จักหรอก server.com
$subject = "แจ้งรหัสผ่านของระบบสมาชิก";
$message = "รหัสผ่านของ Username : $user_forget คือ: $password";
$headers = "From : [email protected]";
|
 |
 |
 |
 |
Date :
2009-12-15 23:32:35 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เอา ออก ก็ Error แบบ อันแรกอ่าคร้าบบ
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header
missing in C:\AppServ\www\forgetpassword2.php on line 14
|
 |
 |
 |
 |
Date :
2009-12-15 23:43:16 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอโทษครับ มันเป็นแค่ตัวอย่างหนะครับ ที่อยู่ email ก็ใช้ของคุณน่ะครับ
ini_set('sendmail_from', 'อีเมล์คุณ@serverของคุณ(localhost ???).com');
คุณ PlaKriM บอกถูกเลยครับ ว่าต้องค่าตัวแปรง $headers คุณผิด
|
 |
 |
 |
 |
Date :
2009-12-15 23:55:04 |
By :
debutant |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ครับ ไม่เป็นไรครับ
Code (PHP)
} else {
$subject = "แจ้งรหัสผ่านของระบบสมาชิก";
$message = "รหัสผ่านของ Username : $user_forget คือ: $password";
$headers = "From : [email protected]";
@hotmail.com ก็ error เหมือนเดิมครับ
หรือไม่ใช่ครับ ช่วยบอกที ตอนนี้งงครับ
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header
missing
|
 |
 |
 |
 |
Date :
2009-12-16 00:01:38 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
OH !!
ใน เครื่องผม ใน Administrative Tools ไม่มี IIS อ่า ครับ
ทำ ไง ครับ = =
เป็น windows xp sp2 2002 ครับ
|
 |
 |
 |
 |
Date :
2009-12-16 00:25:22 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำไมหนอ เห็นแต่คนใช้ PHP บน windows .... เศร้าแทน open source :(
|
 |
 |
 |
 |
Date :
2009-12-16 00:27:07 |
By :
debutant |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แล้ว จะ ทำ ไง อ่ะ ครับ ช่วย บอก ที .....
|
 |
 |
 |
 |
Date :
2009-12-16 00:29:57 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ก็ทำการติดตั้งมันเลย ครับ
1.เตรียมแผ่น windows xp 1แผ่น
2.คลิก start>setting>control panel
3.หาเครื่องมือ ชื่อว่า Add Remove Programs หาเจอแล้วดับเบิ้ลคลิกเปิดเลยครับ
4.จะได้หน้าต่างของโปรแกรมขึ้นมา ทางด้าน ซ้านมือ ให้คลิกเลือกที่ Add/Remove Windows Components รอสักครู่...
5.จะได้หน้าต่างมาอีกอันหนึ่ง ให้เลือกหา Internet Information Services IIS แล้วติ๊กที่ช่องนั้นซะ
6.คลิก Next รอทำการติดตั้งครับแต่ีนี้ก็ได้ล่ะ
7.ทำตามบทความที่ผลให้ไป No. 11 นะครับ
|
 |
 |
 |
 |
Date :
2009-12-16 00:35:03 |
By :
somparn |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบ คุณ มาก ครับ ผม
|
 |
 |
 |
 |
Date :
2009-12-16 00:40:50 |
By :
Vinz- |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ของผมมันไม่ขึ้น Error นะคับ ส่งได้ แต่ว่าทำไม มันไม่เห็นไปที่ Email เลย ไปตรวจก็ไม่เห็นมี
|
 |
 |
 |
 |
Date :
2010-03-29 09:10:13 |
By :
พงษ์ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
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:14:37 |
By :
thaicreate |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|