Hi,
As far as I can tell my script works fine but I wanted to check that I had written it in the right way. Thanks.
PHP Code:$sql = "SELECT email FROM user WHERE username = '$username'";
if (!mysql_query($sql))
error("A database error occurred in processing your ".
"request.\\nIf this error persists, please ".
"contact [email]name@email.com[/email].");
$query = mysql_query($sql, $db);
// Check the database to see if anything matches the entered details.
$number_of_matches = @mysql_num_rows($query);
// If there is a matching entry, reset and send the password
if($number_of_matches >= '1')
{
$result = mysql_fetch_object($query);
$mail_to = $result->email;





Bookmarks