Link to home
Start Free TrialLog in
Avatar of ashburn69
ashburn69

asked on

using php to send email through actionscript? problems occuring?

Ok, Within my flash document i have the following code attatched to a send button,

on (release) {
      url_var = "your_name="+_parent.t1_2+"&your_email="+_parent.t4_2+"&comments="+_parent.t5_2+"&phone="+_parent.t3_2+"&company="+_parent.t2_2;
      getURL("contact.php?"+url_var, "_self", "GET");
      _parent.t1_2 = "your name:";
      _parent.t2_2 = "your company:";
      _parent.t3_2 = "telephone:";
      _parent.t4_2 = "e-mail:";
      _parent.t5_2 = "message:";
}
 and then contact.php contains the code below in the code snipplet. I get no error messages but when i recieve the email it comes out as the following;

FACE="standard 07_53" SIZE="8" COLOR=" to me
      
Company Name:
Contact Name: <P ALIGN=\"LEFT\"><FONT FACE=\"standard 07_53\" SIZE=\"8\" COLOR=\"
Phone Number:
Email Address:

Not what i type in the contact form...

<?php
session_start();
	
$to = "email address here";
$emess = "Company Name: {$_GET['company']}\n";
$emess.= "Contact Name: {$_GET['your_name']}\n";
$emess.= "Phone Number: {$_GET['phone']}\n";
$emess.= "Email Address: {$_GET['your_email']}\n";
$emess.= "\n\n";
$emess.= "{$_GET['comments']}\n";
 
 
$ehead="From:".$_GET['your_name']."";
$subj = "from".$_GET['company'];
$mailsend=mail("$to","$subj","$emess","$ehead");
if($mailsend==true)
{
echo ' <script>alert("Thankyou for your enquiry, we will contact you ASAP!");window.location="http://snatchpac.org";</script>';
} else {
   echo '<script>alert("Sorry there seems to be a problem with our site, Please try again later");window.location="http://snatchpac.org";</script>';
} ?>

Open in new window

Avatar of Rob
Rob
Flag of Australia image

Does trace(url_var) give you what you expect?  you might also escape() url_var and then use urldecode in php
ASKER CERTIFIED SOLUTION
Avatar of Arijit S
Arijit S
Flag of India 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
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
Avatar of ashburn69
ashburn69

ASKER

Ok ill give it a go and get back to you.