I have been spending several hours trying to troubleshoot the code in Script 13.6 - register.php and can't seem to find the solution. The script won't send the email using the following code:
// Send the email.
$body = "Thank you for registering at the User Registration site. To activate your account, please click on this link:\n\n";
$body .= "http://www.mywebsite...h/activate.php" .mysql_insert_id() . "&y=$a";
mail($_POST['email'], 'Registration Confirmation', $body, 'From: admin@mywebsite.com');
// Finish the page.
echo '<h3>Thank you for registering! A confirmation email has been sent to your address. Please click on the link in that email in order to activate your account.</h3>';
include ('./includes/footer.html'); // Include the HTML footer.
exit();
} else { // If it did not run OK.
echo '<p><font color="red" size="+1">You could not be registered due to a system error. We apologize for any inconvenience.</font></p>';
Can anyone help with ideas on what might be wrong?
Thanks.
Script 13.6
Started by
Gary
, Mar 16 2011 9:14 PM
2 replies to this topic
#1
Posted 16 March 2011 - 9:14 PM
#2
Posted 16 March 2011 - 11:24 PM
You don't mention a lot of crucial details. Without them it's impossible to help.
Is your site on a remote webhost or being run locally? What OS is the script on? What version of PHP is being used?
-matthaus
Is your site on a remote webhost or being run locally? What OS is the script on? What version of PHP is being used?
-matthaus
#3
Posted 16 March 2011 - 11:48 PM
You don't mention a lot of crucial details. Without them it's impossible to help.
Is your site on a remote webhost or being run locally? What OS is the script on? What version of PHP is being used?
-matthaus
Thanks matthaus. I have part of it figured out. Took another look and now it's sending to two out of three emails. May actually be my email client. I'll check.










