|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
General - Photo Gallery
Excuse the complete beginners question.
I am building a photo gallery using PHP and MySQL. When I show one of the photographs I wish to put a "next" and "previous" link on the page. Do I need to put these in a form so that I can send the id of the photograph to the next page to query the database for the next or previous photo. |
|
#2
|
||||
|
||||
|
next - previous images
Hi camdes, welcome to the forums.
You could use links with GET variables. eg Code:
<a href="img_db.php?img=3">Previous</a> <a href="img_db.php?img=5">Next</a> Where img_db.php tests for $_GET['img'] and uses the appropriate image.
__________________
WP plugins - Error Reporting, Clean Options http://www.mittineague.com/dev/er.php http://www.mittineague.com/dev/co.php Last edited by Mittineague : April 28th, 2008 at 06:33 PM. |
|
#3
|
|||
|
|||
|
Photo Gallery
Correct me if I am wrong, but as far as I can see, that would only allow me to see the next or previous one. I have not explained myself properly, I need to be able to scroll either way.
Another problem which has just occurred to me is that if I use the id field in my database, I will get an error if a picture has been deleted. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > General - Photo Gallery |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|