Callumtg Posted April 24, 2013 Share Posted April 24, 2013 I'm new to all this stuff so sorry if it's a simple problem I'm trying to create the PHP submit form and this message keeps popping up: Parse error: syntax error, unexpected T_VARIABLE on line 6 this is the code: 1 <?php 2 3 $MyMail = $_POST['mymail'] 4 //Collect my email address using the post method and put it in a box called $MyMail// 5 6 $msg .= "select: ".$_POST['select']."\n"; 7 //collect what is in the 'select' field and put it in the box called $msg// 8 mail ($MyMail, 'select',$msg); 9 //mail the contents of $msg to MyMail and display 'select' on screen// 10 ?> Link to comment https://forums.phpfreaks.com/topic/277268-parse-error-syntax-error-unexpected-t_variable/ Share on other sites More sharing options...
computermax2328 Posted April 24, 2013 Share Posted April 24, 2013 That keeps popping up because you are missing a semi-colon here... $MyMail = $_POST['mymail']; Add it at the end like I did. You might have other errors as well. Link to comment https://forums.phpfreaks.com/topic/277268-parse-error-syntax-error-unexpected-t_variable/#findComment-1426385 Share on other sites More sharing options...
Callumtg Posted April 24, 2013 Author Share Posted April 24, 2013 Thank you, it's working now Link to comment https://forums.phpfreaks.com/topic/277268-parse-error-syntax-error-unexpected-t_variable/#findComment-1426388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.