ba55meister Posted March 6, 2009 Share Posted March 6, 2009 Hi guys I'm new here, just started with PHP and I hope you will help me with my problem I'm making a script that would send email from my enquiry form in the flash movie. I get a T_VARIABLE error in line 15 where ($sender = stripslashes($sender); ) is . here's the script <?php $sender = $_REQUEST["sender"]; $company = $_REQUEST["company"]; $telephone = $_REQUEST["telephone"]; $email = $_REQUEST["email"]; $enquiry = $_REQUEST["enquiry"]; $full_message = "Name :".$sender."/n". "Company:".$company."/n". "Tel. :".$telephone."/n". "Email :".$email."/n". "IP :".$_SERVER['REMOTE_ADDR']."/n/n".$enquiry $sender = stripslashes($sender); $company = stripslashes($company); $telephone = stripslashes($telephone); $email = stripslashes($email); $enquiry = stripslashes($enquiry); $subject = $sender." enquiry form"; mail("[email protected]", $subject, $full_message, "Website Enquiry Form"); ?> thanks a lot Link to comment https://forums.phpfreaks.com/topic/148262-solved-t_variable-error/ Share on other sites More sharing options...
JonnoTheDev Posted March 6, 2009 Share Posted March 6, 2009 you are missing a trailing ; on the previous line: "IP :".$_SERVER['REMOTE_ADDR']."/n/n".$enquiry; Link to comment https://forums.phpfreaks.com/topic/148262-solved-t_variable-error/#findComment-778348 Share on other sites More sharing options...
ba55meister Posted March 6, 2009 Author Share Posted March 6, 2009 thanks a lot ! That solved the problem, but the email i'm getting doesnt contain line breaks.. am i using them right ? /n ? Link to comment https://forums.phpfreaks.com/topic/148262-solved-t_variable-error/#findComment-778356 Share on other sites More sharing options...
JonnoTheDev Posted March 6, 2009 Share Posted March 6, 2009 other way \n Link to comment https://forums.phpfreaks.com/topic/148262-solved-t_variable-error/#findComment-778357 Share on other sites More sharing options...
ba55meister Posted March 6, 2009 Author Share Posted March 6, 2009 hehe ! just worked it out myself !thanks a lot for help ! Link to comment https://forums.phpfreaks.com/topic/148262-solved-t_variable-error/#findComment-778362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.