|
|
|
รบกวนพี่ๆช่วยดู code Forgot_password ให้ผมทีนะครับ มันไม่ยอมส่งเมลไปแต่ว่าขึ้น OK แล้ว |
|
|
|
|
|
|
|
Code (PHP)
<?php include("config/config.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<? include("title.php"); ?>
<!-- BEGIN .styles -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/tipsy.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/jCarousel.css" type="text/css" media="screen" />
<!--[if IE]>
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen, projection" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ie7.css" type="text/css" media="screen" />
<![endif]-->
<link rel="stylesheet" href="css/colors/black.css" type="text/css" media="screen" /> <!-- COLOR -->
<!-- END .styles -->
<!-- BEGIN .scripts -->
<script type='text/javascript' src='js/jquery.js'></script>
<script type='text/javascript' src='js/ui.core.js'></script>
<script type='text/javascript' src='js/jquery.cycle.all.min.js'></script>
<script type='text/javascript' src='js/jquery.nivo.slider.pack.js'></script>
<script type='text/javascript' src='js/jquery.easing.1.3.js'></script>
<script type='text/javascript' src='js/jquery.prettyPhoto.js'></script>
<script type='text/javascript' src='js/jquery.jcarousel.min.js'></script>
<script type='text/javascript' src='js/jquery.tipsy.js'></script>
<script type='text/javascript' src='js/jquery.arrowFade.js'></script>
<script type='text/javascript' src='js/ui.tabs.js'></script>
<script type='text/javascript' src='js/jquery.custom.js'></script>
<script type='text/javascript' src='js/jquery.tweetable.js'></script>
<script type='text/javascript' src='js/showhid.js'></script>
<script type='text/javascript' src='js/cufon-yui.js'></script>
<script type='text/javascript' src='js/waukegan.font.js'></script>
<!-- END .scripts -->
<!-- [favicon] begin -->
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<!-- [favicon] end -->
<script type="text/javascript">
Cufon.replace('h1, h2, h3:not(#footer h3, .title-blog), h4, h5, h6, table th', {fontFamily: 'Waukegan'});
//Cufon.replace('.sidebar-nav a', {fontFamily: 'Champagne', hover: true});
jQuery(document).ready(function($){
$("a[rel^='prettyPhoto']").prettyPhoto({
theme: 'facebook'});
});
</script>
<style type="text/css">
.style3 {color: #666666;
font-size: small;
font-weight: bold;
font-family: "Courier New", Courier, monospace;
}
</style>
</head>
<body class="no_js">
<? include("menu.php"); ?>
<!-- END HEADER -->
<? include("news.php"); ?>
<!-- START CONTENT -->
<div id="content">
<div class="inner">
<div class="text" style="width:900px; height:100%;">
<h2>FORGOT PASSWORD </h2>
<div class="toggle-title">
<span class="open-toggle closed"> </span>
<h4><a href="#" title="Open">Click to open : Forgot Password</a></h4>
</div>
<div class="toggle-content">
<font size="4">ลืมชื่อผู้ใช้งานของคุณใช่ไหม?</font><br /><br />
<font size="2">โปรดป้อนที่อยู่อีเมลสำหรับกู้รหัสผ่านของคุณที่ได้ระบุไว้เมื่อสร้างบัญชีผู้ใช้</font>
<div id="usermessagea"></div>
<form name="add" action="" method="post" class="" onSubmit="" >
<table width="317" height="46" border="0">
<tr>
<td width="309" height="40" class="style3"> อีเมล :
<input name="email" type="text" id="email" size="25" maxlength="50" />
<input name="action" type="hidden" value="sendemail" />
<a class="small green button" onClick="document.add.submit()">ส่งอีเมล</a>
</td>
</tr>
</table>
</font>
</form>
</div>
<?
if($_POST['action']=='sendemail')
{
$txtemail = $_POST['email'];//email ที่กรอกจาก textbox
if ($txtemail != "")
{
$sqlsendemail = "SELECT * FROM users where email='$txtemail'";
$resultsend = mysql_query ($sqlsendemail);
$ts = mysql_num_rows($resultsend);
if ($ts != "")
{
while ($rs = mysql_fetch_array($resultsend))
{
$user = $rs['logname'];
$pass = $rs['pass'];
$depass = base64_decode ( $pass );
echo "<h1>OK</h1>";
}
}
else
{
echo "<h1>Email Error !</h1>";
}
}
else
{
echo "<h1>Input Email</h1>";
}
}
?>
</div>
<!-- .text -->
<!-- START SIDEBAR --><!-- END SIDEBAR -->
</div>
<div class="clear"></div>
<br /><br /> <br /><br /><br />
</div>
<!-- END CONTENT --><!-- END FLASH NEWS -->
<!-- START FOOTER --><!-- END FOOTER -->
<? include("nav.php"); ?>
<!-- START COPYRIGHT -->
<? include("footer.php"); ?> <!-- END COPYRIGHT -->
<script type="text/javascript">
//<![CDATA[
Cufon.now(); //]]>
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8632327-9']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
Tag : PHP, JavaScript, CakePHP
|
|
|
|
|
|
Date :
2012-06-27 16:18:52 |
By :
หน่อไม้ |
View :
868 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ในนี้มานแค่ select ข้อมูลเองนิหน่า ยางไม่ได้ทำการส่งmailเลย
Code (PHP)
$sqlsendemail = "SELECT * FROM users where email='$txtemail'";
$resultsend = mysql_query ($sqlsendemail);
$ts = mysql_num_rows($resultsend);
if ($ts != "")
{
while ($rs = mysql_fetch_array($resultsend))
{
$user = $rs['logname'];
$pass = $rs['pass'];
$depass = base64_decode ( $pass );
echo "<h1>OK</h1>";
}
}else{
echo "<h1>Email Error !</h1>";
}
|
|
|
|
|
Date :
2012-06-27 16:35:31 |
By :
LuckyStar |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ถ้าใช้ส่งแล้ว ยังไม่ถึงปลายทาง ก็เป็นปัญหาที่ Server แล้วครับ
|
|
|
|
|
Date :
2012-06-27 16:47:55 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
serverที่ใช้เป็นเครื่องwin2003 ครับ
---------------------
<?
if($_POST['action']=='sendemail')
{
$txtemail = $_POST['email'];//email ที่กรอกจาก textbox
if ($txtemail != "")
{
$sqlsendemail = "SELECT * FROM users where email='$txtemail'";
$resultsend = mysql_query ($sqlsendemail);
$ts = mysql_num_rows($resultsend);
if ($ts != "")
{
while ($rs = mysql_fetch_array($resultsend))
{
$user = $rs['logname'];
$pass = $rs['pass'];
$depass = base64_decode ( $pass );
echo "<h1>OK</h1>";
}
}
else
{
echo "<h1>Email Error !</h1>";
}
}
else
{
echo "<h1>Input Email</h1>";
}
}
?>
|
|
|
|
|
Date :
2012-06-27 17:01:34 |
By :
หน่อไม้ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|