# Flash PHP Contact Form to ASP Conversion

**URL:** https://forum.kirupa.com/t/flash-php-contact-form-to-asp-conversion/194105
**Category:** programming
**Created:** [July 20, 2006, 3:45pm UTC](https://forum.kirupa.com/t/flash-php-contact-form-to-asp-conversion/194105 "2006-07-20T15:45:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![GarretB](https://avatars.discourse-cdn.com/v4/letter/g/35a633/32.png) [@GarretB](https://forum.kirupa.com/u/GarretB)
#### Post date: [July 20, 2006, 3:45pm UTC](https://forum.kirupa.com/t/flash-php-contact-form-to-asp-conversion/194105/1 "2006-07-20T15:45:11Z")

</div>

I currently have a Flash form that works perfectly with PHP on the server, but my client wants ASP instead of PHP. Can anyone help me with the conversion?

Will the code in Flash remain the same or does it have to change?

Thanks! Any help would be greatly appreciated.

[COLOR=Red]Here is the code within Flash[/COLOR]

```auto
stop();

var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function() {
    senderLoad.theFirstName = theFirstName.text;
    senderLoad.theLastName = theLastName.text;
    senderLoad.thePhone = thePhone.text;
    senderLoad.theEmail = theEmail.text;
    senderLoad.theComments = theComments.text;
    senderLoad.sendAndLoad("/bertrand/send.php",receiveLoad);
}

receiveLoad.onLoad = function() {
    if(this.sentOk) {
        _root.gotoAndStop("success");
    }
    else {
        _root.gotoAndStop("failed");
    }
}

```

[COLOR=Red]Here is my PHP Server Side Script

[/COLOR]

```auto
<?php 
$to = "garret.bertrand@gmail.com";
$subject = "Forty Fifth Test Contact Form";
$message = "First Name: " . $_POST['theFirstName'];
$message .= "
Last Name: " . $_POST['theLastName'];
$message .= "
Phone: " . $_POST['thePhone'];
$message .= "

Email: " . $_POST['theEmail'];
$message .= "

Comments: " . $_POST['theComments'];

$headers = "From: $theEmail";
$headers .= "
Reply-To: $theEmail";

$sentOk = mail($to,$subject,$message,$headers);

echo "sentOk=" . $sentOk;

?>

```

[COLOR=Red]  
[/COLOR]
