0 Replies Latest reply on Feb 15, 2007 3:26 AM by elyas2004

    how toget url varibles in flash

    elyas2004
      i am trying to load the php varible in flash movie. i am able to do it fine but when i filter my php date with url paremters i have problem.

      my php code is

      <?php
      $tab1 =
      mysql_connect("localhost","root","503748");
      mysql_select_db("test");

      $tab = $_GET['name'];
      $qr = mysql_query("SELECT * FROM contacts WHERE LEFT(lastName,1) = '".$tab."' ORDER BY lastName");
      //$qr = mysql_query("SELECT * FROM contacts WHERE LEFT(lastName,1) = 'A'");

      // start output string with number of entries
      $nrows = mysql_num_rows($qr);
      $rString = "n=".$nrows;/* */

      for ($i=0; $i < $nrows; $i++) {
      $row = mysql_fetch_array($qr);
      $rString .= "&lastName".$i."=".$row['lastName']."&firstName".$i."=".$row['firstName'];
      $rString .= "&phone".$i."=".$row['phone']."&email".$i."=".$row['email'];
      $rString .= "&picFile".$i."=".$row['picFile']."&caption".$i."=".$row['caption'];
      }
      $x=$rString ;
      "myVar=$x";
      echo $rString;

      ?>


      my varible in flash is "myvar"

      my php and flash is in the same page soo when php filters with varible like test.php?name=a my falsh dost pass the varible from php code to flash but if i filter the php code if set my php to set values it works.

      how can i get the value of url test.php?name=a in to url inside flash.

      onClipEvent (load) {
      //assuming you have a personal web server and PHP installed locally
      loadVariables(" http://localhost/sofia/test.php ", this, "GET");
      }
      ----------------------------------------------------------------------------------
      how can i make this code to get the url value like this
      onClipEvent (load) {
      //assuming you have a personal web server and PHP installed locally
      loadVariables(" http://localhost/sofia/test.php?name=value ", this, "GET");
      }
      ------------------------------------------------------------------------------------------ --------
      what am i suppose to do to set the value of ?name= inside the movie clip to value on the url.