Jump to content

I'm new... HELP!!!


Motas

Recommended Posts

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>
Link to comment
Share on other sites

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 ^
Link to comment
Share on other sites

<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>
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

[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 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>
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.