本文介绍了忘记密码无法正常工作......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 下面是我的忘记密码,为什么不能正常工作?当我点击提交按钮时,它仍然保留在同一页面上,就像我没有点击任何东西一样...... [PHP]<?php if($ go ==" 1") { mysql_connect(" localhost"," root","") ; mysql_select_db(" ums电子工作门户网站); $ sql = @mysql_query(" SELECT * FROM company WHERE username ='' $ username''&& emailAdd =''$ email''"); if(!$ sql) { echo用户名和电子邮件地址不匹配。; 退出; } $ query = mysql_query($ sql ); $ fPass = mysql_fetch_array($ query); $ to =" SELECT * FROM company WHERE emailAdd =''$ email''" ;; $ subject ="您的密码" ;; $ body =" SELECT * FROM company WHERE username =''$ username''&& password =''$ password''" ;; $ headers =" from:[email protected]\\\" ;; mail( $ to,$ subject,$ body,$ headers); echo"您的密码已发送至$ to" ;; } ?> [/ PHP] [HTML]< form action ="<?= $ PHP_SELF?>" method =" post"> 用户名:< input type =" text"命名= QUOT;用户名"大小= QUOT; 24英寸; border =" 0">< br> 电子邮件:< input type =" text"名称= QUOT;电子邮件"大小= QUOT; 24英寸; border =" 0">< br> < input type =" hidden"命名= QUOT;去"值= QUOT 1 QUOT; border =" 0">< input type =" submit"名称= QUOT; submitButtonName" border =" 0"> < / form [/ HTML]> 解决方案 username''&&& emailAdd ='' Below is my forget password, why cannot function?? When i click on the submit button, it still remain on the same page and just like i didn''t click anything...[PHP]<?phpif($go == "1"){mysql_connect("localhost","root","");mysql_select_db("ums e-job portal");$sql = @mysql_query("SELECT * FROM company WHERE username=''$username'' && emailAdd=''$email'' ");if(!$sql){echo "The username and email address do not match.";exit;}$query = mysql_query($sql);$fPass = mysql_fetch_array($query);$to = "SELECT * FROM company WHERE emailAdd=''$email'' ";$subject = "Your Password";$body = "SELECT * FROM company WHERE username=''$username'' && password=''$password'' ";$headers = "From: [email protected]\n";mail($to, $subject, $body, $headers);echo "Your Password has been sent to $to";}?>[/PHP][HTML]<form action="<?= $PHP_SELF ?>" method="post">Username: <input type="text" name="username" size="24" border="0"><br>E-mail: <input type="text" name="email" size="24" border="0"><br><input type="hidden" name="go" value="1" border="0"><input type="submit" name="submitButtonName" border="0"></form[/HTML]> 解决方案 这篇关于忘记密码无法正常工作......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-01 23:19