Can't get my php script to display results on same page
Posted: Sun Jan 07, 2007 5:15 am
I'm using this form mailer script from http://www.dagondesign.com/articles/secure-php-form-mailer-script/. The only way I could get it to work was by creating a UDT (user defined tag) which would call it from an external php file. (I tried putting the whole script in a UDT, but kept getting a 403 error message, also tried using {literal}{/literal} and even tried enabling {php} in the config file, but those methods didn't work either.)
Anyway, I was able to get the script to work, but the only problem I'm having is that I can't figure out how to get it to display the results on the same page where I placed the UDT calling the script. So for instance, after someone fills out the contact form and hits the submit button, it should display either an error message or a thank you message on the same page, http://www.domainname.com/contact/, but instead displays the message on the external php page [url=http://www.%20domainname.com/formmailerscript.php]http://www. domainname.com/formmailerscript.php[/url].
Any ideas? Has anyone else ever use this form mailer script from http://www.dagondesign.com/articles/secure-php-form-mailer-script/? Any insight would be greatly appreciated.
Anyway, I was able to get the script to work, but the only problem I'm having is that I can't figure out how to get it to display the results on the same page where I placed the UDT calling the script. So for instance, after someone fills out the contact form and hits the submit button, it should display either an error message or a thank you message on the same page, http://www.domainname.com/contact/, but instead displays the message on the external php page [url=http://www.%20domainname.com/formmailerscript.php]http://www. domainname.com/formmailerscript.php[/url].
Any ideas? Has anyone else ever use this form mailer script from http://www.dagondesign.com/articles/secure-php-form-mailer-script/? Any insight would be greatly appreciated.