ItsWesYo Posted August 25, 2006 Share Posted August 25, 2006 I probably did the coding wrong anyway, but an error shows up saying "Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/wes/public_html/apply1.php on line 14".Line 14 says:if(isset($_POST['submit'])) {[b]apply.php[/b][code]<?phpinclude ("http://wes.hypreed.com/header.php");$page = $_REQUEST['action'];if($page == "sent"){echo ( "<center><br><br><?phpif(isset($_POST['submit'])) {$to = "affiliate@wes.hypreed.com";$subject = "Affiliate Application";$name = $_POST['name'];$email = $_POST['email'];$url = $_POST['website'];$message = $_POST['message'];$body = "Name: $name\n\nEmail: $email\n\nWebsite: $url\n\nMessage: $message";echo "Thanks! Your affiliate application will be reviewed.<br>Allow at least a day for a response.";mail($to, $subject, $body);} else {echo "Uh oh! Seems like an error.";}</center>?>" );die();}else {echo ( "<center><b>Fill out all the fields below to apply.</b><br><br><table><tr><td><form method='POST' action='?action=sent'><b>Polairia Username:</b><br><input type='text' name='name' size='25'><br><br><b>Email address:</b><br><input type='text' name='email' size='25'><br><br><b>Website URL:</b><br><input type='text' name='website' size='25'><br><br><b>Any other info needed?</b><br><textarea name='message' rows='5' cols='30'></textarea> <br><br><input type='submit' value='Apply' name='submit'></form></td></tr></table></center>");die();}?>[/code]I rather have this format instead of using "include ("sent.php");" so i won't have a lot of pages. Quote Link to comment Share on other sites More sharing options...
trq Posted August 25, 2006 Share Posted August 25, 2006 I dont know where your logic is going but it seems your trying to echo php code, try this instead....[code=php:0]<?php include ("http://wes.hypreed.com/header.php"); if (isset($_POST['submit'])) { echo "<center><br><br>"; $to = "affiliate@wes.hypreed.com"; $subject = "Affiliate Application"; $name = $_POST['name']; $email = $_POST['email']; $url = $_POST['website']; $message = $_POST['message']; $body = "Name: $namennEmail: $emailnnWebsite: $urlnnMessage: $message"; echo "Thanks! Your affiliate application will be reviewed.<br>Allow at least a day for a response."; mail($to, $subject, $body); echo "</centre>"; } else {?><center><b>Fill out all the fields below to apply.</b><br><br><table><tr><td><form><b>Polairia Username:</b><br><input type='text' name='name' size='25'><br><br><b>Email address:</b><br><input type='text' name='email' size='25'><br><br><b>Website URL:</b><br><input type='text' name='website' size='25'><br><br><b>Any other info needed?</b><br><textarea name='message' rows='5' cols='30'></textarea> <br><br><input type='submit' value='Apply' name='submit'></form></td></tr></table></center><?php}?>[/code] 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.