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 = "[email protected]"; $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:[email protected]'>here</a> for account access.</p>"); } ?> Link to comment https://forums.phpfreaks.com/topic/68861-solved-php-e-mail/ 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? Link to comment https://forums.phpfreaks.com/topic/68861-solved-php-e-mail/#findComment-346101 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......."; Link to comment https://forums.phpfreaks.com/topic/68861-solved-php-e-mail/#findComment-346102 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']; Link to comment https://forums.phpfreaks.com/topic/68861-solved-php-e-mail/#findComment-346103 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. Link to comment https://forums.phpfreaks.com/topic/68861-solved-php-e-mail/#findComment-346104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.