hey guys, ive been coding for about a month now, and i want users to be able to request there password from the site if they lose it, ive done all i can using snippets and the support forum but it still aint working, i just get
Warning: Server Error in C:\Inetpub\wwwroot\John\admin\mailinfo2.php on line 113
I guess its something to do with my configuration but i dont know what it is,
im running win 2000 IIS.
incase its something to do with the code heres the code i have
//connect to database and select info
$sql="SELECT password FROM users WHERE email = '$email'";
$result=mysql_query($sql,$db);
$row = mysql_fetch_array($result);
$id = $row["ID"];
$password = $row["password"];
$email = $row["email"];
$user = $row["user"];
$address = "mr.bob@btinternet.com";
$subject = "Login detail";
$body = "
This is an automated message sent by www.john-scp.com\n
\n
\n
Hi $user,\n
\n
We received a request to change your password.\n
If you did not make such a request than somebody faked it and you should ignore this email message.\n
\n
\n
If you made the request here is the information you require.\n
\n
--- Login details ---\n
Login name : $user\n
Password : '$password'\n
\n
Type the password without the quotes around it, those are only there so you know if the password contains any spaces.\n
\n
Chris Harrison\n
";
$headers = "From: support@john-scp.net\nX-Mailer: PHP/ . phpversion());";
$mailsend = mail($address , $subject , $body , $headers);
echo "$mailsend";
please help me