# FLASH -- PHP code to send and receive images

**URL:** https://forum.kirupa.com/t/flash-php-code-to-send-and-receive-images/294332
**Category:** programming
**Created:** [August 12, 2009, 4:02pm UTC](https://forum.kirupa.com/t/flash-php-code-to-send-and-receive-images/294332 "2009-08-12T16:02:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ron\_ron](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@ron\_ron](https://forum.kirupa.com/u/ron_ron)
#### Post date: [August 12, 2009, 4:02pm UTC](https://forum.kirupa.com/t/flash-php-code-to-send-and-receive-images/294332/1 "2009-08-12T16:02:09Z")

</div>

It’s a SUBMIT form - There are 5 checkboxes which are used to select 5 types of images. How to write my AS code to send the selected images to the PHP and then back to [abc@mail.com](mailto:abc@mail.com) ?

The current AS code:

```auto
 var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
 
 
sender.onRelease = function () {
senderLoad.thename = thename.text;
senderLoad.thecompany = thecompany.text;
senderLoad.theaddress = theaddress.text;
senderLoad.sendAndLoad("[web-web/send.php",receiveLoad](http://www.indico.net.au/dyodept/send.php&quot;,receiveLoad));
}
receiveLoad.onLoad = function () {
if(this.sentOk) {
  _root.gotoAndStop("success");
}
else {
  _root.gotoAndStop("failed");
}
}

```

The current PHP code:

```php
 <?PHP
$to = "abc@mail.com";

$subject = "subj.sbuj"; 
$headers = "From:" .$email."
"; 
$headers .= "Bcc: $email
"; 
$message = "Name: " . $thename; 
$message .= "

Company or Club Name: " . $thecompany;
$message .= "

Address: " . $theaddress;
$sentOk = mail("$to",$subject,$message,$headers);

echo "sentOk=" . $sentOk;

```
