views:

33

answers:

1

hi,

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 function 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

+1  A: 

hi,

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.

Jay