Jump to content


Photo

I'm new... HELP!!!


  • Please log in to reply
9 replies to this topic

#1 Motas

Motas
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 September 2006 - 07:53 AM

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 output
echo "<p>Congratulations! You are now registered!<br \></p>
// send email
LINE 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>


#2 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 09 September 2006 - 08:20 AM

the error usually points to the line before the line number stated, which is this line:

echo "<p>Congratulations! You are now registered!<br \></p>";

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:

$body.="<p>You will recieve an activation link in your email at $email.</p>\n";

because there is nothing there. I assume you are going for something like ^
Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#3 Motas

Motas
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 September 2006 - 08:40 AM

now everythign worked.....kinda... now i get this
You will recieve an activation link in your email at $email.

\n"; mail($_POST['$email'],'Thank you for registering, $name', $body, 'From:accountcreation@exzyle.com'); ?>

#4 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 09 September 2006 - 08:44 AM

repost your edited code.

Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#5 Motas

Motas
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 September 2006 - 08:45 AM

<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 output
echo "<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>


#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 September 2006 - 08:48 AM

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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#7 Motas

Motas
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 September 2006 - 08:51 AM

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

#8 .josh

.josh
  • Staff Alumni
  • .josh
  • 14,871 posts

Posted 09 September 2006 - 08:52 AM

<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 output
echo "<p>Congratulations! You are now registered!<br \></p>";
echo "<p>You will recieve an activation link in your email at $email.</p>\n";

// send email

mail($email,"Thank you for registering, $name", $body, 'From:accountcreation@exzyle.com');
?>
</body>
</html>

Did I help you? Feeling generous? Buy me lunch! 
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community :)

#9 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 September 2006 - 08:54 AM

well looks all good to me but maybe soon your get a mysql database good luck mate.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#10 Motas

Motas
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 09 September 2006 - 09:02 AM

THANK YOU SO MUCH!!!! that works perfectly! :o




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users