php - Parse error: syntax error, unexpected T_STRING in /usr/local/4admin/apache/vhosts/ -


anyone know why getting following error message?

parse error: syntax error, unexpected t_string in /usr/local/4admin/apache/vhosts/abmhd.com/httpdocs/forms/email.php on line 11 " line 11 " $recipient = "me@mywebsite.com "

<?php $name = $_post['name']; $email = $_post['email']; $phone = $_post['phone']; $call = $_post['call']; $website = $_post['website']; $priority = $_post['priority']; $type = $_post['type']; $message = $_post['message']; $formcontent=" from: $name \n phone: $phone \n call back: $call \n website:           $website \n priority: $priority \n type: $type \n message: $message"; $recipient = "me@mywebsite.com<script type="text/javascript"> /* <![cdata[ */ (function(){try{var     s,a,i,j,r,c,l,b=document.getelementsbytagname("script");l=b[b.length-1].previoussibling;a=l.getattribute('data-cfemail');if(a) {s='';r=parseint(a.substr(0,2),16);for(j=2;a.length-j;j+=2) {c=parseint(a.substr(j,2),16)^r;s+=string.fromcharcode(c);}s=document.createtextnode(s);l.parentnode.replacechild(s,l);}}catch(e){}})(); /* ]]> */ </script>"; $subject = "contact form"; $mailheader = "from: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("error!"); echo "thank you!"; ?>` 

you should escape this:

$recipient = "me@mywebsite.com<script type=\"text/javascript\"> 

and same " inside variable definition.

or maybe easier change outer double apostrophes single ones.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -