pictures on click

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
ansa1
Forum Newbie
Posts: 16
Joined: Sat Mar 27, 2004 9:19 am
Location: Ontario, Canada

pictures on click

Post by ansa1 »

I have a table in db with stored 10 pictures.
Table: pictures
ID
listingID
picture_1
picture_2
pictu…..

How to make pictures display, on clicks in order 1, 2, 3,...

Thanks .....

ansa1
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Keep a count in the url or via POST of what picture to show, and then get this value from the database and show it. Have a link at the bottom that imcrements the image count - so the next image is shown.
ansa1
Forum Newbie
Posts: 16
Joined: Sat Mar 27, 2004 9:19 am
Location: Ontario, Canada

Post by ansa1 »

to make it more clearer to me, ( I am pretty new to PHP ) can you give a sample with _ POS T

Thanks

ansa1
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

what hes suggesting is use the GET or POST method (the get would be if it was in the url, ie: user.php?user=tim

you would use
$_GET['user'];

have it a page where it gives all the ids of the images, and when they click on it, assign the id to a var and use the get method on the other page to display it.

i may be wrong, good method tho
Post Reply