开发者

Smarty template question

i am new to smarty template and i am trying to do this. I have a html form in the tpl file and in that form action is for a php email f开发者_如何学Cunction email.php. I am not able to get it to work. if i have the complete code(html form + php email code) and save as a php file, it works fine.

is there any way to call the php code from email.php inside that tpl file? i am completely new and i am just making some changes on the site.

regards


after doing some google search, i found that i can do this way

In the tpl(ex - mail.tpl)

{ php }
//all php code here, in my case its the mailer
{ /php }

and in the form action, just give "mail.tpl" .

fyi, i designed this contact with ajax way to just do the submission in the same page without navigating.


{php}{/php} is deprecated in Smarty V3 now

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜