Next & Previous buttons without a database?

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
puns0steel
Forum Newbie
Posts: 3
Joined: Wed Apr 30, 2008 6:35 pm

Next & Previous buttons without a database?

Post by puns0steel »

I have a quick site I'm making with 20 sequential pages. The files are named

index.php
01.php
02.php
....etc
19.php
20.php

Do you know how I can have two images (a left and a right arrow) act as Next and Previous buttons, going from 01 to 02, and so on? It seems like an array could do it, but I'm just learning. And I'd rather not use MySql on this. It'd be great if 20 wrapped back to index.php, but it doesn't have to.

Thoughts?
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: Next & Previous buttons without a database?

Post by yacahuma »

so , you have 20 static pages? if that is the case, just use hard coded buttons
Post Reply