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_ema il="+_pare nt.t4_2+"& comments=" +_parent.t 5_2+"&phon e="+_paren t.t3_2+"&c ompany="+_ 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...
on (release) {
url_var = "your_name="+_parent.t1_2+
getURL("contact.php?"+url_
_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>';
} ?>
Does trace(url_var) give you what you expect? you might also escape() url_var and then use urldecode in php
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok ill give it a go and get back to you.