I am a computer dummy who needs a kind-hearted PHP genius to provide me with some cut and past code for my web site. I think this should be simple to do but, I obviously don't know enough to be sure. Don't bother trying to explain the underlying principles to me 'cause I won't understand and you will waste your time. If I can cut and paste, then I have a chance.
What I need…
I am updating my site to a new format in which I will be adding entries on a regular basis (like a blog). The entries will end up numbering in the hundreds (maybe over 1000). The entries (each a separate file) will reside in a directory called "articles" in the root directory). Each article (file) will be consecutively numbered. I prefer to use the file naming convention "0001.php", "0002.php". etc. but I could also go with "1.php", "2.php", etc.--if that is easier to program for.
I will have a right arrow for the next entry (file), and a back arrow for the previous entry (file). I would like for the next arrow (link) to recognize the current file's number (less the extension) and add one to it so it will go the next file when clicking the arrow. Ditto with subtract one for the previous arrow. If no greater or lesser number exists in the directory, it should go to the home page (always in the same location). For example, something like"/directory/".
Well, that's about it. Anyone out there who can help?
Thanks for reading.