URLLoader not working in Browser but in Dev Area

So I have a contact form that works flawlessly in the Flash development area, but doesn’t work in-browser. I’ve tried in multiple browsers, and it doesn’t work in any of them. Here is the relevant AS3 code:

var url:String = "http://******/Scripts/sendContact.php";
        var contactVar:URLVariables = new URLVariables();
            contactVar.userName = commentName;
            contactVar.email = commentEmail;
            contactVar.subject = commentSubject;
            contactVar.body = commentBody;
            contactVar.to = commentAddie;
        
        var sendContact:URLRequest = new URLRequest (url);
            sendContact.data = contactVar;
            sendContact.method = "POST";
        var recieveContact:URLLoader = new URLLoader();
            recieveContact.addEventListener (ProgressEvent.PROGRESS, progressHandler);
            recieveContact.addEventListener (Event.COMPLETE, completeHandler);
            recieveContact.load (sendContact);

The *****s is replaced with the actual domain. All variables are defined and set. Again, this code works in the development area of Flash, but not in my browser. Here is my PHP code:

<?php
  $Name = $_POST['userName'];
  $email = $_POST['email'];
  $recipient = $_POST['to'];
  $mail_body = $_POST['body'];
  $subject = $_POST['subject'];
  
//  print ($Name." ".$email." ".$recipient." ".$mail_body." ".$subject);
//  print ("Test");
  
  $header = "From: ". $Name . " <" . $email . ">
";
  mail($recipient, $subject, $mail_body, $header);
  
  
  $sendResult = "Message Sent!";
  echo (urlencode($sendResult));
  
?>

Anyone have any thoughts? This website is being hosted on DreamHost. Is it an issue with that hosting service, or an issue with my code? Any and all help is greatly appreciated!

On a side note, if this helps any, sendToURL using the POST method doesn’t seem to work with anything hosted on this server, but with GET it does.