Includes... and if statments?
Posted: Thu Jul 14, 2005 6:56 am
Hello,
I've read several tutorials on php before and I have mostly worked with includes for web site purposes.
Now, however, I need to create a website for books to be viewed online. And making a separate php file for each page of the book(s) is not what I would like to go through. Instead, I thought, there must be a way to just "switch" one part of the website for another - meaning switch on include for another.
So if a person was reading book 1, and clicked on the page 4 link, then the url would look something like books.php?id=1&page=4 and the page include would change to load page 4.
Some one recommended if statements, but I can't seem to get them to work. I understand what they are, but how will they help my website? Most tutorials I have visited on the net talk about if statements for programming purposes and databases.
Any help or a push in the right direction would be most welcome.
I hope my english is clear enough, and sorry if it isn't.
I've read several tutorials on php before and I have mostly worked with includes for web site purposes.
Now, however, I need to create a website for books to be viewed online. And making a separate php file for each page of the book(s) is not what I would like to go through. Instead, I thought, there must be a way to just "switch" one part of the website for another - meaning switch on include for another.
So if a person was reading book 1, and clicked on the page 4 link, then the url would look something like books.php?id=1&page=4 and the page include would change to load page 4.
Some one recommended if statements, but I can't seem to get them to work. I understand what they are, but how will they help my website? Most tutorials I have visited on the net talk about if statements for programming purposes and databases.
Any help or a push in the right direction would be most welcome.
I hope my english is clear enough, and sorry if it isn't.