Motas Posted September 9, 2006 Share Posted September 9, 2006 im having a hell of a time trying to send an email after completing a form im having an error on line 18 and the script is as follows (also i get no email in header) help?<html><head><title>Registration Complete!</title></head><body><?php//calling registration$name = $_REQUEST['name'];$email = $_REQUEST['email'];$race = $_REQUEST['race'];//Not used: $_REQUEST['gender'], and// $_REQUEST['submit']// show outputecho "<p>Congratulations! You are now registered!<br \></p>// send emailLINE 18////$body = "Thank you have registered with The Land of The Exzyled!\nSincerely,\nTheGods";<p>You will recieve an activation link in your email at <i>$email</i>.</p>\n";mail($_POST['$email'],'Thank you for registering, <b>$name</b>', $body, 'From:accountcreation@exzyle.com');?></body></html> Quote Link to comment Share on other sites More sharing options...
.josh Posted September 9, 2006 Share Posted September 9, 2006 the error usually points to the line before the line number stated, which is this line:[color=brown]echo "<p>Congratulations! You are now registered!<br \></p>[/color][color=red][b]";[/b][/color]and you are missing "; at the end. After fixing that, you will find that you will get another error right after that, on this line:[color=red][b]$body.="[/b][/color][color=brown]<p>You will recieve an activation link in your email at $email.</p>\n";[/color]because there is nothing there. I assume you are going for something like ^ Quote Link to comment Share on other sites More sharing options...
Motas Posted September 9, 2006 Author Share Posted September 9, 2006 now everythign worked.....kinda... now i get thisYou will recieve an activation link in your email at $email.\n"; mail($_POST['$email'],'Thank you for registering, $name', $body, 'From:accountcreation@exzyle.com'); ?> Quote Link to comment Share on other sites More sharing options...
.josh Posted September 9, 2006 Share Posted September 9, 2006 repost your edited code. Quote Link to comment Share on other sites More sharing options...
Motas Posted September 9, 2006 Author Share Posted September 9, 2006 <html><head><title>Registration Complete!</title></head><body><?php//calling registration$name = $_REQUEST['name'];$email = $_REQUEST['email'];$race = $_REQUEST['race'];//Not used: $_REQUEST['gender'], and// $_REQUEST['submit']// show outputecho "<p>Congratulations! You are now registered!<br \></p>";// send email$body.="<p>You will recieve an activation link in your email at $email.</p>\n";<p>You will recieve an activation link in your email at <i>$email</i>.</p>\n";mail($_POST['$email'],'Thank you for registering, <b>$name</b>', $body, 'From:accountcreation@exzyle.com');?></body></html> Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 9, 2006 Share Posted September 9, 2006 I like your code but i need to point out some things what will work better for you.you should let a user sign up then send them a link then the link goes to an update page to tell mysql to activate the members account then when they first log in then send them the thank you message to there email account ok.good luck.please note the way you got it know the email account could not exist. Quote Link to comment Share on other sites More sharing options...
Motas Posted September 9, 2006 Author Share Posted September 9, 2006 well see i dont have MySQL set up thats probably a huge problem, im just learning PHP, and am VERY new. and thank you xD ;D Quote Link to comment Share on other sites More sharing options...
.josh Posted September 9, 2006 Share Posted September 9, 2006 [code]<html><head><title>Registration Complete!</title></head><body><?php//calling registration$name = $_REQUEST['name'];$email = $_REQUEST['email'];$race = $_REQUEST['race'];$body = "Thank you have registered with The Land of The Exzyled!\nSincerely,\nTheGods";//Not used: $_REQUEST['gender'], and// $_REQUEST['submit']// show outputecho "<p>Congratulations! You are now registered!<br \></p>";echo "<p>You will recieve an activation link in your email at $email.</p>\n";// send emailmail($email,"Thank you for registering, $name", $body, 'From:accountcreation@exzyle.com');?></body></html>[/code] Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 9, 2006 Share Posted September 9, 2006 well looks all good to me but maybe soon your get a mysql database good luck mate. Quote Link to comment Share on other sites More sharing options...
Motas Posted September 9, 2006 Author Share Posted September 9, 2006 THANK YOU SO MUCH!!!! that works perfectly! :o Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.