Techmate Posted July 16, 2011 Author Share Posted July 16, 2011 Not sure if I am following you anymore but if I am, I dont know if I can make more clear example than this. Say you have data in database like below table : user_created_galleries_in_db id | gallery_name --------------------------------- 1 | Cars 2 | Store 3 | Something table : images id | image | gallery_id (references to user_created_galleries_in_db(id)) ----------------------------------------------------------------------------- 1 | car1.jpg | 1 2 | car2.jpg | 1 3 | car3.jpg | 1 Then this is how you show images from gallery // Sql for creating the links to the page $sql = "SELECT id, gallery_name FROM table user_created_links_in_db"; $result = mysql_query($sql); // Generate the liks from user created galleries from db while($row = mysql_fetch_assoc($result)) { echo '<a href="gallery_id='. $row['id'] .'">'. $row['gallery_name'] .'</a></br>'; } // Now if user clicks gallery link, show the data related to that gallery if (isset($_GET['gallery']) && intval($_GET['callery_id']) > 0) { $galleryId = intval($_GET['gallery_id']); $sql = "SELECT image FROM images WHERE gallery_id = $galleryId"; $result = mysql_query($sql); // Show images in clicked glalery while($row = mysql_fetch_assoc($result)) { // Show image data } } So you have the idea of categories but, I updated my database and tables, colums based on what you your script but I am conflicted. The script is incomplete and I don't see were to include my pagination script. Could you incorporate a completed script with pagination that works with categories. Thanks! Quote Link to comment Share on other sites More sharing options...
TeNDoLLA Posted July 16, 2011 Share Posted July 16, 2011 I might later, but now I am at work so can't do it now. Quote Link to comment Share on other sites More sharing options...
Techmate Posted July 18, 2011 Author Share Posted July 18, 2011 Awesome, Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.