1 Reply Latest reply on Jan 25, 2007 3:35 AM by Peter Lorent

    flash/php fails

    jagguy99 Level 1
      I am using flash/php and are getting errors on php (free web hosting site) which i don't get on my localhost.

      I don't get any error on my localhost but i get 3 error which I can't fix.

      flash part
      ---
      send_lv.alName=combo1.value
      send_lv.sendAndLoad(" http://jagguy.ej.am/flash/snlCombo.php", nameVars, "GET");

      php
      ------
      errors if I run the file on its own.

      Notice: Undefined index: alName in /home/jagguy/public_html/flash/snlCombo.php on line 6


      Nothing to display from photoAlbum :
      Display more photos
      Notice: Undefined variable: i in /home/jagguy/public_html/flash/snlCombo.php on line 42

      Notice: Undefined variable: file in /home/jagguy/public_html/flash/snlCombo.php on line 51
      files=

      php file snlCombo.php
      --
      <?php

      include("dbconnect.php");

      $alName="";
      $alName=$_GET["alName"];
      $sql4="select id from album where Name='$alName' ";
      $result4 = mysql_query("$sql4") or die("Invalid query: " . mysql_error());
      $nt2=mysql_fetch_array($result4) ;
      $alNum=$nt2['id'];



      $sql = "SELECT * FROM image2 WHERE (del !='deleted' or del is null) and
      albumId='$alNum'";
      // is null ORDER BY id DESC LIMIT $offset, $itemsPerPage";

      // $sql = "SELECT * FROM image2 WHERE (del !='deleted' or del is null) and albumId='2'";

      $result = mysql_query($sql) or die("Invalid query: " . mysql_error());

      //echo mysql_num_rows($result);

      if (mysql_num_rows($result)==0)
      {
      echo "

      Nothing to display from photoAlbum :".$alName;
      echo "
      <a href='viewPhoto.php'>Display more photos [/url] ";
      }
      else
      {
      $i=1;
      //$nt=mysql_fetch_array($result) ;
      while($nt=mysql_fetch_array($result))
      {
      $file[$i]=$nt['filename'];
      $i++;

      }

      }

      $total=$i-1;
      $filestr="";

      for($j=1;$j<$total;$j++)
      {
      $filestr=$filestr.$file[$j].",";

      }
      //need to add last file on its own
      $filestr=$filestr.$file[$total];
      $files="files=".$filestr;
      echo $files ;



      ?>


      i have no idea how to fix this and using error(0) does nothing