Jump to content
Larry Ullman's Book Forums

Recommended Posts

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.com/dispatch/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.



} 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?



Link to comment
Share on other sites

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?





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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...