We help IT Professionals succeed at work.
Get Started

using php to send email through actionscript? problems occuring?

ashburn69
ashburn69 asked
on
1,121 Views
Last Modified: 2010-05-18
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

Comment
Watch Question
DevOps Practice Head
Commented:
This problem has been solved!
Unlock 2 Answers and 4 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE