PHP email form in Flash

Hi all,

I have a PHP form that I’ve incorporated into my Flash project. When I hit the send button for the form, I have it so that an email is sent to the person who filled out the form (a thank you email) and also an email to the administrator of the form (a form was filled out). But for some reason both emails are sent to the person filling out the form and none to the administrator. Also, I’ve noticed that the form might be browser dependent? Can that be? I noticed it working in IE but maybe not in Firefox?

Here is the code, please help!


<?php 
 
$namex=$_POST['namex']; 
$emailx=$_POST['emailx']; 
$companyx=$_POST['companyx']; 
$cityx=$_POST['cityx']; 
$webx=$_POST['webx']; 
$subjectx=$_POST['subjectx']; 
$messagex=$_POST['messagex']; 
$namex=trim($namex); 
$emailx=trim($emailx); 
$subjectx=StripSlashes($subjectx); 
$messagex=StripSlashes($messagex); 
 
$toaddress='[email protected]'; 
 
$adminaddress = "[email protected]"; 
$siteaddress ="http://www.site.com"; 
$sitename = "Website"; 
$who = "you"; 
 
 
$valid = validate_emailx($emailx); 
 
switch ($valid) { 
 
  case 0: 
    mail ($emailx,$subjectx, 
   "** This is a submission generated from the contact form from $sitename** 
") ; 
 
   mail ($emailx,"Thank You for your recent inquiry with $sitename", 
   "$namex,
 
   Thank you for your interest in $sitename.
 
   I will respond to your email shortly.
 
   Sincerely,
 
   $who 
   $siteaddress","FROM:$adminaddress") ; 
 
     echo 'response=passed'; 
     break; 
 
  case 1: 
     echo 'response=invalid'; 
     break; 
 
} 
 
?>