Link to home
Start Free TrialLog in
Avatar of vigilence
vigilence

asked on

Flash php contact form email results

Thanks to Experts Exchange moagrius (guru) I have gotten this far with my flash template php contact form .  It works in that I do get an email from sumitting the form. I get a successfully sent message.  But the email contents do not contain the info ithat was entered n the text fields. The content I get in the email looks like this:

reset_txt   [type Function]
rec   [the email address i put in the ActionScript is repeated here]
serv   php
fields_descriptions   ,t1,your_name,Your Name:,t2,your_email,Your Email:,t3,telephone,Telephone:,t4,message,Message:,t5,field_2,E-mail:,t6,field_3,Address:,t7,field_4,fax:
path   _level0.instance1626

The ActionScript on the submit button is herein code snippet:
Thanks any help!

rec="blissett@cox.net";
serv="php";

var fields_descriptions= Array ("", 
									Array("t1", "your_name", "Your Name:"), 
									Array("t2", "your_email", "Your Email:"),
									Array("t3", "telephone", "Telephone:"),
									Array("t4", "message", "Message:"),
									Array("t5", "field_2", "E-mail:"),
									Array("t6", "field_3", "Address:"),
									Array("t7", "field_4", "fax:")
								);

function reset_txt(name,name2,value) {
		path=eval(_target);
		path[name2]="";
}
	


for (i=1; i<=fields_descriptions.length; i++) {
	reset_txt("t"+i, fields_descriptions[i][1], fields_descriptions[i][2]);
}

Open in new window

Avatar of moagrius
moagrius
Flag of United States of America image

the AS in the FLA is crazy - I'd rewrite the contact form part.  Post the PHP mailer and I'll try to make something that works.
Avatar of vigilence
vigilence

ASKER

Thanks.....what is the PHP mailer? :)
there's a PHP script that sends the mail form - it's named "contact.php" - post the contents
Yikes..yes...code snippet attached.  Thanks.:)
<?php

Error_Reporting(E_ALL & ~E_NOTICE);
$subject="from ".$_REQUEST['Your_Name:'] ;
$headers= "From: ".$_REQUEST['Your_Email:'] ."\n";
 $headers.='Content-type: text/html; charset=iso-8859-1';
 $message='';
  while ($field = current($_REQUEST)) {
  	if ((key($_REQUEST)!="Your_Name:") && (key($_REQUEST)!="Your_Email:") && (key($_REQUEST)!="Message:") && (key($_REQUEST)!="i")) {
	 	$message.="<strong>".key($_REQUEST)."</strong>&nbsp;&nbsp;&nbsp;".$field."<br>";
	}
	next($_REQUEST);
 }
$message.="<br>".$_REQUEST['Message:'];
mail($_REQUEST['recipient'], $subject,  "
<html>
<head>
 <title>Contact letter</title>
</head>
<body>
<br>
  ".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");

?>
<script>
	resizeTo(300, 300);

</script>

Open in new window

this is going to take a little bit and i'm out all day tomorrow - i'll try to get to it tonight, but it might be wednesday...  :/
take your time moaqrius....i can't thank you enough!
SOLUTION
Avatar of moagrius
moagrius
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ha!  np - glad it's working for you