I-AM-OBODO Posted June 27, 2018 Share Posted June 27, 2018 Hi all, I don't know if there's a gallery for this already or the right place to ask the question. User uploads multiple images. Images are store in a different folder and a unique name stored on the database. All images have a unique group for referencing purpose . When a user clicks on a link in his table he can view all images pertaining to a group. How can i go about that? What i want to achieve is for example SELECT ALL FROM IMAGE_TABLE WHERE USERNAME = USERNAME AND GROUP_ID = GROUP_ID Thanks Link to comment Share on other sites More sharing options...
requinix Posted June 27, 2018 Share Posted June 27, 2018 Sounds good so far... Are you having a particular problem? Link to comment Share on other sites More sharing options...
I-AM-OBODO Posted June 27, 2018 Author Share Posted June 27, 2018 2 hours ago, requinix said: Sounds good so far... Are you having a particular problem? Yeah. What i currently have can only view the images one after the other by clicking on the back button. But what i am after is to view the images like a gallery where all can be viewed with clicking the back button but by clicking an arrow key to view next or previous image. by code is $stmt = $pdo->prepare(" SELECT * FROM image_table WHERE post_id = '$_SESSION[post_id]' AND group_id = '$_SESSION[group_id]' "); $stmt->execute(); while($row = $stmt->fetch(PDO::FETCH_ASSOC)) { echo '<a href="'.$row['image_path'].'"> View</a>'; echo "<br>"; } Link to comment Share on other sites More sharing options...
I-AM-OBODO Posted June 27, 2018 Author Share Posted June 27, 2018 3 hours ago, requinix said: Sounds good so far... Are you having a particular problem? Thanks. Found a gallery that i modified to make it up and running just as i wanted. Cant find how to mark thread as solved! Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.