View Full Version : Help with E-Mail Web Form

08-30-2012, 07:03 AM
I've been searching all over to try to resolve my problem with this web form and I'm having no luck. I purchased a template on templatemonster.com and I can't get the web form to send an e-mail through the website.

I've seen several similar threads, but because I'm completely ignorant on this subject I can't make their solutions work.

First - here's the action script in swish (I got a swish template):

onSelfEvent (load){

_parent.fields_descriptions= Array ("",
Array("t1", _root.contact_1, "your_name"),
Array("t2", _root.contact_2, "your_email"),
Array("t3", _root.contact_3, "your_message")
for (i=1; i<=_parent.fields_descriptions.length; i++) {

Next - here's the contact.php:
Error_Reporting(E_ALL & ~E_NOTICE);

while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);

$post_vars[key($_REQUEST)][0]=preg_replace ("/<[^>]*>/", "", $pre_array[0]);
$post_vars[key($_REQUEST)][1]=preg_replace ("/<[^>]*>/", "", $pre_array[1]);


$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {


mail('isaac@happy-pantry.com', $subject, "
<title>Contact letter</title>
</html>" , $headers);
echo ("Huzzah! Your message was so good we didn't just want to send it, we NEEDED to send it!");

resizeTo(300, 300);

Is this all correct and there's a problem somewhere else? Is there something I'm missing?

Thanks for the help - and sorry for the long mesage! Let me know if there's any information I forgot to include!