thunder_sti Posted March 7, 2008 Share Posted March 7, 2008 I have this error Ive been trying to correct for the past hour.lol Any help would be apreciated. Parse error: syntax error, unexpected T_STRING in /home/boricua/public_html/sendpage.php on line 16 <?php if (isset($_POST['submit'])){ $to="".$_POST['friendemail'].""; $subject="".$_POST['yourname']." wants you to check this hot website!"; $mail_from="from: ".$_POST['youremail']." \n"; $mail_from .="Content-Type: text/html; charset=utf-8 \n"; $message="<font size=\"2\" face=\"Verdana\"> <b>".$_POST['friendemail']."</b>,<br /> ".$_POST['yourname']." wants you to check this website!!:<br /> <a href=\"www.boricua-racing.com/forum/index.php">Yo visit our site bro. You can enjoy the community and the staffs. Visita Nuestra pagina de Boricua-Racing. Eres Fiebru ? No te lo pierdas y disfrute ahora.</a> </font>"; $sentmail = mail($to,$subject,$message,$mail_from); echo "We have dispatch an e-mail to your friend.E-mail enviado a su amigo."; }else{ ?> <?php } ?> Thanks Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/ Share on other sites More sharing options...
pocobueno1388 Posted March 7, 2008 Share Posted March 7, 2008 <?php if (isset($_POST['submit'])){ $to="".$_POST['friendemail'].""; $subject="".$_POST['yourname']." wants you to check this hot website!"; $mail_from="from: ".$_POST['youremail']." \n"; $mail_from .="Content-Type: text/html; charset=utf-8 \n"; $message="<font size=\"2\" face=\"Verdana\"> <b>".$_POST['friendemail']."</b>,<br /> ".$_POST['yourname']." wants you to check this website!!:<br /> <a href=\"www.boricua-racing.com/forum/index.php\">Yo visit our site bro. You can enjoy the community and the staffs. Visita Nuestra pagina de Boricua-Racing. Eres Fiebru ? No te lo pierdas y disfrute ahora.</a> </font>"; $sentmail = mail($to,$subject,$message,$mail_from); echo "We have dispatch an e-mail to your friend.E-mail enviado a su amigo."; }else{ } ?> Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/#findComment-486279 Share on other sites More sharing options...
revraz Posted March 7, 2008 Share Posted March 7, 2008 You didn't escape the second quote here <a href=\"www.boricua-racing.com/forum/index.php"> Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/#findComment-486280 Share on other sites More sharing options...
fnairb Posted March 7, 2008 Share Posted March 7, 2008 I believe you missed a quote... index.php">Yo visi shouldn't it be index.php\">Yo visi Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/#findComment-486282 Share on other sites More sharing options...
thunder_sti Posted March 7, 2008 Author Share Posted March 7, 2008 Thanks Fellas, It has worked properly. How can I add a back link to the forums, after the email have been sent: "We have dispatch an e-mail to your friend. Su E-mail fue enviado a su amigo."; Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/#findComment-486305 Share on other sites More sharing options...
eddierosenthal Posted March 7, 2008 Share Posted March 7, 2008 i think you also missed a quote in this line $message="<font size=\"2\" face=\"Verdana\"> <b>".$_POST['friendemail']."</b>,<br /> ".$_POST['yourname']." wants you to check this website!!:<br /> there is no end quote for the message. Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/#findComment-486382 Share on other sites More sharing options...
frijole Posted March 7, 2008 Share Posted March 7, 2008 You didn't escape the second quote here <a href=\"www.boricua-racing.com/forum/index.php"> In what situations is it necessary to escape quotes? Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/#findComment-486385 Share on other sites More sharing options...
revraz Posted March 7, 2008 Share Posted March 7, 2008 Double quotes inside of double quotes. Instead of using the 2nd double quote in the string, it will end the string instead. Link to comment https://forums.phpfreaks.com/topic/94933-parse-error-unexpected-t-string/#findComment-486401 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.