Thumbnail Gallery with Comments?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Genix
Forum Newbie
Posts: 2
Joined: Sun Sep 07, 2003 1:54 am

Thumbnail Gallery with Comments?

Post by Genix »

I am trying to make a picture gallery on my site. Right now I have a php script that display the images with links to the bigger picture but I want it to get a little more advanced. I want it to have arrows that you can use to scroll through the pictures. I also want to be able to add comments to the pictures, sort of like PictureTrail. If you have any ideas, please let me know.

http://www.thegenix.com/pics/

http://www.thegenix.com/pics/index.php.txt (my current script that i got from a website)
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

that auto loaded everything. only thing i can think of is using a db.


make a pic table.

CREATE TABLE pics(
pic_name varchar(20) NOT NULL,
comment text NOT NULL,
INDEX pic_name (pic_name)
)TYPE=MyISAM;
Genix
Forum Newbie
Posts: 2
Joined: Sun Sep 07, 2003 1:54 am

Post by Genix »

I am really bad at PHP. Could you go into a little more detail?
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

ok. i had you confused then... there's someone on here with a similar name...has helped me a number of times here.

the db is seperate from php. figure out what db you want to use. if it's mysql i can give you those commands, otherwise you need to find pear commands or the commands for your db.

basically: php reads the directory
php selects the pics that are to be displayed on the page
php connects to the db. if this fails it displays the pics with the note "unable to connect to db for comments"
otherwise it gets the comments and displays with comments
Post Reply