1 Reply Latest reply on Apr 13, 2010 1:05 PM by Mi-ul-MVAtZo

    attempting to use several url parameters in one url


      Problem: I can either pass along the picture ID parameter or the album ID parameter to the next page, but never both

      I have a URL parameter for the picture ID, and I have another for the album ID, which determines also the directory where the pictures are stored on the server.



      Only the album ID parameter:

      photoalbum.php?mod=album&id_alb=<?php echo $row_rsImages['id_alb']; ?>

      which generates this URL: photoalbum.php?mod=album&id_alb=6

      Result: loads picture A just fine


      Only the picture ID parameter:

      photoalbum.php?mod=detail&id_img=<?php echo $row_rsImages['id_img']; ?>

      which generates this URL: photoalbum.php?mod=detail&id_img=8

      Result: loads picture B just fine


      Now I want to pass both parameters:

      photoalbum.php?mod=detail&id_img=<?php echo $row_rsImages['id_img']; ?>mod=album&id_alb=<?php echo $row_rsImages['id_alb']; ?>

      which generates this URL: photoalbum.php?mod=detail&id_img=8mod=album&id_alb=

      Shows only one picture

      But when I type a number at the end of the url so that it reads;


      It shows both pictures


      MySQL Query:

      SELECT id_img, Vlg_img, idalb_img, filename_img, filenameA_img, filenameB_img, description_img, date_img
      FROM image_img
      WHERE idalb_img = colname

      Name: colname
      Type: Text
      Standard Value:  -1
      Runtime Value: $_GET['id_alb']


      MySQL Query:

      SELECT id_alb, title_alb, description_alb, backgr_img
      FROM album_alb
      WHERE album_alb.id_alb= bgrname

      Name: bgrname
      Type: Text
      Standard Value:  -1
      Runtime Value: $_GET['id_alb']


      It's puzzling me for days now, can someone please help me?


      MySQL - 5.0.27
      MySQL client version: 4.1.20

      PHP Version 5.2.3