Alan82 Posted August 4, 2012 Share Posted August 4, 2012 Hi Larry and other developers. I really hope someone can help me. I'm trying to do chapter 18 (I have read through the whole book but this is the first time I'm tried to do some of the code). I've installed xampp, started mercury (set up a new user) but that's all the mercury config I've done to mercury and xampp. I followed Larry's install guide from peachpits website (but didn't notice anything on mercury setup). I'm using php version 5.4.4. I'm very new to php though. So this is probably something really simple that I've missed or don't know about. In chapter 18 I'm on the register.php. I click submit at first I didn't see anything just a white space. So I commented out the first exit() and now I get the "thank you for registering" (data goes into the DB) but I don't get my email (my email addy is valid and I've checked spam etc Does anyone know what I've missed or what I can do to debug further? ... if (mysqli_affected_rows($dbc) == 1) { $body = "Thank you for registering \n\n You need to activate your account, Please click the following link to complete the registration process \n\n"; $body .= BASE_URL . 'activate.php?x=' . urlencode($e) . "&y=$a"; mail($trimmed['email'],'Registration', $body, 'From: online@xx.co.uk'); // exit(); //commented this out as I wasn't seeing the below text echo '<h3>Thank you for registering! A confirmation Email has been sent to your email address. Please click on the link in that email in order to active your account and access all the exclusive content!<h3>'; include ('includes/footer.html'); exit(); ... Really appreciate anyones/everyone help. So many thanks in advance, Regards, Alan Link to comment Share on other sites More sharing options...
Alan82 Posted August 4, 2012 Author Share Posted August 4, 2012 Sorry everyone, I've looked further (and found Larry's comment on page 330!). It appears that on xampp the messages are sent to a folder by default /xampp/mailoutput and setting up mercury seems a bit involved!. I just got confused as I tried wamp before and that sent emails happily with no config. As long as I can see these emails I'm happy! (just have to worry when I put this live and I then don't receive an email!). Sorry to spam the forums though. Brilliant book though Larry. Lately I've read 2 or 3 web languages and all have been useless. This book is perfect though. All the information I need and at the perfect pace! You should knighted! Link to comment Share on other sites More sharing options...
Paul_Blackpool Posted August 5, 2012 Share Posted August 5, 2012 Hope you fixed it. I had the same problem and I was told to set up my server details and take out some ; in sendmail file. Cant remember where though. Link to comment Share on other sites More sharing options...
Larry Posted August 6, 2012 Share Posted August 6, 2012 Kudos, Alan, for figuring it out and thanks for the nice words on what I do. It is appreciated. Would love to be knighted. See what you can do about making that happen! Link to comment Share on other sites More sharing options...
Recommended Posts