Clinton Posted September 11, 2007 Share Posted September 11, 2007 Help. Please. Error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/anderse/public_html/NAIS/8321/inc/register.php on line 47 It has something to do with my $_POST's. Tried a couple of different things. Nothing working. <?php $to = "me@gmail.com"; $subject = "8321 User Registration"; $body = "Hi, '".$_POST['First']."', '".$_POST['Last']."' has requested access to the Database. $_POST['Email'] "; if (mail($to, $subject, $body)) { echo("<p>You will receive an e-mail when the administrator approves your account.</p>"); } else { echo("<p>Please contact the administrator <a href='mailto:me@gmail.com'>here</a> for account access.</p>"); } ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 11, 2007 Share Posted September 11, 2007 It looks fine to me. Which is line 47? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted September 11, 2007 Share Posted September 11, 2007 do the easy thing: $First = $_POST['First']; $Last = $_POST['Last]; $Email = $_POST['Email']; $body = "Hi, $First, $Last has requested access to the Database. $Email......."; Quote Link to comment Share on other sites More sharing options...
MadTechie Posted September 11, 2007 Share Posted September 11, 2007 try $body = "Hi, ".$_POST['First'].", ".$_POST['Last']." has requested access to the Database. ".$_POST['Email']; Quote Link to comment Share on other sites More sharing options...
Clinton Posted September 11, 2007 Author Share Posted September 11, 2007 It's the $body line but I'm an idiot. I didn't include the "$_POST['Email'" in the required enclosure. It was hiding off my screen. 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.