9 Replies Latest reply on Oct 27, 2009 1:09 PM by kglad

    Help with sendAndLoad()

    realworks

      Hi, I'm using sendAndLoad() in my Flash file like:

       

      my_vars = new LoadVars();
      my_vars.newNumber = _root.temp_number;
      my_vars.sendAndLoad("updatenum.php", my_vars, "POST");

       

      The PHP I'm currently using:
      <?php
      if (isset($_POST['newNumber'])){
          $num = $_POST['newNumber'];
          //DATABASE STUFF HERE...
      }
      ?>

       

      I basically want to send a number to PHP so I can use it to update a database.

       

      This seems to work. But I get '404 Not Found' in Firebug's Net. BUT the PHP file does execute the database query and works as intended..
      If I link absolutely to updatenum.php, I get a '500 Internal Server Error' message and the database query doesn't work.

       

      Can anyone see where I am going wrong or offer any advice on how to stop the '404 Not Found' error?

       

      Many thanks,
      Marc