7 Replies Latest reply on Dec 20, 2006 2:32 PM by ac1982

    Can I Send&Load Variables at the same time using php?

    ac1982
      Hi
      I have a php file that is using $_GET method to get the "id" of an item and then a query will search the database and return the results back. I am using the following code but there is something wrong. Can anyone help me with this?

      myVar = new LoadVars();
      myVar.id = "1";
      myVar.SendAndLoad(" http://localhost/sports/latest_news.php",myVar,"GET");

      //<?php $out = "";
      // $out .= "idn" . $i . "&" ;
      // $out .= "titlen" . $row['sports_news_title'];
      // echo $out;
      //?>

      myVar.idn
      myVar.titlen

      myVar.onLoad = function (success)
      {
      if (success)
      {
      for( var key in this )
      {
      //content is the variable name for the text object where the output text will be displayed
      content = this[key];
      }
      }
      else
      {
      trace (" Error loading variables ");
      }
      }