Unexpected T_Variable????
Posted: Mon Apr 02, 2007 10:08 am
feyd | Please use
I have checked all the $_POST variables to make sure they're correct for the field name. I have tried the $_POST variables with and without the single quotes in the brackets. I have tried both concatenating the strings like above and just making it all one big line of code in quotations. Nothing I can think of works. Why isn't my code working and what to I do to fix it?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am trying to write a script that will email both the user and the site owner when a user registers on the site. Everytime I click submit on the form, it tells me:
[quote]Parse error: syntax error, unexpected T_VARIABLE in /misc/27/000/115/947/6/user/web/incomegains.bravehost.com/IGcreate.php on line 9[/quote]
The line varies according to how I rearrange the code and stuff. These are the lines of code that give me trouble:Code: Select all
$msg = ("Welcome to the Income Gains," . $_POST['FirstName'] . " " . $_POST['LastName'] . "!");
$subject = "Welcome to the Income Gains.";
$MSImsg = "Email: . $_POST['Email']" . "<br>Name: " . $_POST['FirstName'] . " " . $_POS['LastName'] . "<br>Zip: " . $_POST['Zip'] . "<br>Password: " . $_POST['Password'];
$MSIsubj = "New Member";
mail("willyjlyles@yahoo.com", $MSIsubj, $MSImsg);
mail($_POST['Email'], $subject, $msg);feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]