scrivo Posted November 23, 2009 Share Posted November 23, 2009 Im trying to make a price quote form using ajax. it works fine as a stand alone php file. ive made up a template file for WHMCS and am getting this error: Fatal error: Smarty error: [in serverquote.tpl line 363]: syntax error: unrecognized tag: error_reporting(0); if (mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n")) echo nl2br(" can anyone help me out? thanks Josh 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted November 23, 2009 WHMCS Support Manager Share Posted November 23, 2009 Try wrapping the code with {literal} and {/literal} 0 Quote Link to comment Share on other sites More sharing options...
scrivo Posted November 23, 2009 Author Share Posted November 23, 2009 thanks john I tried that out and i either get this error: Fatal error: Smarty error: [in serverquote.tpl line 364]: syntax error: unrecognized tag: {php (Smarty_Compiler.class.php, line 446) in /home/mediafo/public_html/includes/smarty/Smarty.class.php on line 1093 or depending on where i put it, none of the content appears and the footers all messed up. is there anything else i can try? 0 Quote Link to comment Share on other sites More sharing options...
scrivo Posted November 23, 2009 Author Share Posted November 23, 2009 ok, ive messed around with it a fair bit and got it to the stage where everything loads, but some of the code is printing on the page rather than actioning. this is the problem part of the code <?php } else { error_reporting(0); if (mail($to, $subject, $msg, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n")) //Message sent! //It the message that will be displayed when the user click the sumbit button //You can modify the text if you want echo nl2br(" <div class=\"MsgSent\"> <h1>Congratulations!!</h1> <p>Thank you <b><?=$name;?></b>, your message is sent!<br /> I will get back to you as soon as possible.</p> </div> "); else // Display error message if the message failed to send echo " <div class=\"MsgError\"> <h1>Error!!</h1> <p>Sorry <b><?=$name;?></b>, your message failed to send. Try later!</p> </div>"; } ?> where would be the best parts for the {literal} tags, coz i tried a few places and end up with the same result. 0 Quote Link to comment Share on other sites More sharing options...
codestomper Posted February 6, 2010 Share Posted February 6, 2010 Is there an answer to this? 0 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.