Jump to content

Recommended Posts

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 by Mr-Chidi
Link to comment
https://forums.phpfreaks.com/topic/307406-php-gallery/
Share on other sites

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
https://forums.phpfreaks.com/topic/307406-php-gallery/#findComment-1559098
Share on other sites

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 by Mr-Chidi
Link to comment
https://forums.phpfreaks.com/topic/307406-php-gallery/#findComment-1559099
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.