# sendAndLoad to PHP load problem

**URL:** <https://forum.kirupa.com/t/sendandload-to-php-load-problem/175256>\
**Category:** flash\
**Created:** [January 12, 2006, 10:54pm UTC](https://forum.kirupa.com/t/sendandload-to-php-load-problem/175256 "2006-01-12T22:54:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cxlink](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/cxlink/32/2077_2.png) [@cxlink](https://forum.kirupa.com/u/cxlink)\
**Post date:** [January 12, 2006, 10:54pm UTC](https://forum.kirupa.com/t/sendandload-to-php-load-problem/175256/1 "2006-01-12T22:54:01Z")

</div>

I’ve been working on this for a while. I have used loadVariables before but not sendAndLoad.

Here is my Action script.

----------------------------------------------------------------------AS-------------------------------------------------------------------

```auto
 function onSubmit() {
     formData = new LoadVars();

     formData.email2 = "";
     formData.confirmEmail = "";

     formData.email2 = email2.text;
     formData.confirmEmail = confirmEmail.text;

     replyData = new LoadVars();
     replyData.onLoad = function(){
     if (this.sent == 1) {
     this._parent.gotoAndStop(28);}
     };

     formData.sendAndLoad("[http://x/email.php",](http://x/email.php) replyData, "post");}  

```

-----------------------------------------------------------------------email.php-------------------------------------------------------------------

```php
<?php

import_request_variables("P","swf_");

define_syslog_variables();
openlog("SWFLog", LOG_PID | LOG_PERROR, LOG_LOCAL0);

$email2 = $swf_email2;
$confirmEmail = $swf_confirmEmail;

syslog(LOG_WARNING, "$serialized");

syslog(LOG_WARNING, "Email2 = $email2 ");
syslog(LOG_WARNING, "confirmEmail = $confirmEmail");

closelog();
echo "1
";
echo "&sent=1&";
exit(0);
?>

```

not sure how to return what ever it is that needs to be returned.

Thanks for your help.

Link
