I-AM-OBODO Posted June 27, 2018 Share Posted June 27, 2018 (edited) 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 Edited June 27, 2018 by Mr-Chidi Quote Link to comment https://forums.phpfreaks.com/topic/307406-php-gallery/ 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? 1 Quote Link to comment https://forums.phpfreaks.com/topic/307406-php-gallery/#findComment-1559093 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>"; } Quote Link to comment https://forums.phpfreaks.com/topic/307406-php-gallery/#findComment-1559098 Share on other sites More sharing options...
I-AM-OBODO Posted June 27, 2018 Author Share Posted June 27, 2018 (edited) 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 Edited June 27, 2018 by Mr-Chidi Quote Link to comment https://forums.phpfreaks.com/topic/307406-php-gallery/#findComment-1559099 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.