Send data to PHP

Warning: Illegal string offset 'language' in /var/www/vhosts/ansuz.nl/subdomains/blog/httpdocs/wp-content/plugins/igsyntax-hiliter/classes/frontend.php on line 510 Warning: ksort() expects parameter 1 to be array, string given in /var/www/vhosts/ansuz.nl/subdomains/blog/httpdocs/wp-content/plugins/igsyntax-hiliter/classes/frontend.php on line 513

In order to have a PHP script executed (and not opened in a window) through ActionScript use loadVars.sendAndLoad(url, your_data, method) instead of loadVars.send(url). In this way the opening of a new window isn’t necessary.

example:

  1. // create a new LoadVars instance
  2. var c_lv:LoadVars = new LoadVars();
  3.  
  4. // populate it with some data
  5. c_lv.bericht = input_bericht.text;
  6. c_lv.email = input_mail.text;
  7.  
  8. // offer the data to the PHP mail handler and execute it!
  9. c_lv.sendAndLoad("sendForm.php", c_lv, "POST");

Leave a Reply

Your email address will not be published. Required fields are marked *