Jump to content

veroaero

New Members
  • Posts

    8
  • Joined

  • Last visited

Contact Methods

  • AIM
    aerocott
  • Website URL
    http://veroaero.com

Profile Information

  • Gender
    Not Telling
  • Location
    Los Angeles

veroaero's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I need some help. Say that I have a list in my MySQL database that contains elements "A", "S", "C", "D" etc... Now, I want to generate an html table where these elements should be distributed in a random and unique way while leaving some entries of the table empty, see the picture below. But, I have no clue how to do this... Any hints? Thanks in advance, Vero
  2. Ok, here is my example: I am trying to build next/previous links for this code: In this example, I have the present id of the photo I am looking at, and I can get the rest of the photos in the same category, but they are not necessarily in order, can be id's like: 3, 4,5 7, 11. // Full Size View of Photo else if( $pid ) { $result = mysql_query( "SELECT photo_caption,photo_filename,photo_id FROM gallery_photos WHERE photo_id='".addslashes($pid)."'" ); $row = mysql_fetch_array($result) or die(mysql_error()); $photo_caption = $row['photo_caption']; $photo_filename = $row['photo_filename']; $photo_id = $row['photo_id']; $nr = mysql_num_rows( $result ); if( empty( $nr ) ) { echo"\t Oj! Det finns inga foton i den här kategorin! \n"; } else { $result2 = mysql_query( "SELECT category_name FROM gallery_category WHERE category_id='".addslashes($cid)."'" ); $row2 = mysql_fetch_array($result2) or die(mysql_error()); $category_name = $row2['category_name']; $result3 = mysql_query( "SELECT photo_id FROM gallery_photos WHERE photo_category='".addslashes($cid)."'" ); $row3 = mysql_fetch_array($result3); echo"<br><a class='pinkLink' href='daif_vimmel.php?cid=$cid'>&raquo ".$category_name."</a><br>\n"; echo"<div class='fullviewbox'> \n <img class='fullview' src='".$images_dir."/".$photo_filename."' alt='".$photo_caption."' >\n <br>\n $photo_caption \n </div>"; } } // Final Output This might be a totally stupid question...
  3. Hi, Here is my example: Say I have an array with id's of photos or something: 3,4,5,7,11. If I am currently looking at id=4, how do I get the whole array and their order so I know that id:4 is the second photo and 3 is the first etc and the last one is 11? (I get these results from my mysql database.) Thanks in advance, Vero
  4. Yes, I want to paginate my results. I know how to do that when I loop through my results, but here I have already decided which photo to show on the previous page, and I don't loop through the full view photos. I was just hoping for some simple hints how to get pagination in this case because I can't figure out how to do it. ???
  5. Hello, I am trying to figure out how to add "next" and "previous" links to a full view page in a photo album I am doing. I can't figure out how to do it in this case though and I would appreciate some hints/advice on how to do it. Here is the php code where I am trying to add the links: // Full Size View of Photo else if( $pid ) { $result = mysql_query( "SELECT photo_caption,photo_filename,photo_id FROM gallery_photos WHERE photo_id='".addslashes($pid)."'" ); $row = mysql_fetch_array($result) or die(mysql_error()); $photo_caption = $row['photo_caption']; $photo_filename = $row['photo_filename']; $photo_id = $row['photo_id']; $nr = mysql_num_rows( $result ); if( empty( $nr ) ) { echo"\t There are no photos in this category! \n"; } else { $result2 = mysql_query( "SELECT category_name FROM gallery_category WHERE category_id='".addslashes($cid)."'" ); $row2 = mysql_fetch_array($result2) or die(mysql_error()); $category_name = $row2['category_name']; $result3 = mysql_query( "SELECT photo_id FROM gallery_photos WHERE photo_category='".addslashes($cid)."'" ); $row3 = mysql_fetch_array($result3); echo"<br><a class='pinkLink' href='daif_vimmel.php?cid=$cid'>&raquo ".$category_name."</a><br>\n"; echo"<div class='fullviewbox'> \n <img class='fullview' src='".$images_dir."/".$photo_filename."' alt='".$photo_caption."' >\n <br>\n $photo_caption \n </div>"; } } Thanks in advance, Vero
  6. Hi! I need some help for a smart way of checking that the drop down form was used and a value was chosen. I know that I can check this with $_POST variables afterwards but the question is, can I do it before the actual Submit button is hit? Something like this: The submit button is not visible until the dropdown form has been used? Or is this a stupid thing to do?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.