By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,134 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,134 IT Pros & Developers. It's quick & easy.

forget password can't function...

100+
P: 127
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]<?php
if($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: admin@localhost.com\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]>
Feb 4 '07
Share this Question
Share on Google+
52 Replies


100+
P: 127
You will need to keep it running in order to use mail.


sorry, can u give me some guildeline how to keep it running??
Thanks...
Feb 26 '07 #51

Motoma
Expert 2.5K+
P: 3,235
sorry, can u give me some guildeline how to keep it running??
Thanks...
Don't hit the X button at the top.
Feb 26 '07 #52

100+
P: 127
Try this:

From the start menu, click Run.
Type in 'cmd'.
From the command prompt, type 'telnet localhost 25'.
What do you see?

When i do the above process, it show me
220 localhost
so, what should i do now?? can u give me some guildeline??
and when send the mail on forget password, it show me:
Warning: mail(): SMTP server response: 503 in C:\Apache2\Apache2\htdocs\forgotPassword.php on line 25
Error sending email
Thanks a lot, motoma..
Mar 2 '07 #53

52 Replies

Post your reply

Sign in to post your reply or Sign up for a free account.