PHP Question?
PHP Question?
- Started
- Last post
- 3 Responses
- neverblink0
Multiple ways of doing this, easiest with your include-function would be to make the link something like
index.php?page=1
then add a check to your php script, that checks if page is numerical, and if it is, do a switch statement on the number..
if page = 1 include somepage.php
if page = 2 include someotherpage.php
- Shepstar150
Thanks neverblink, I just found a way!
- vaxorcist0
make sure you force validate the variable to a number or something very simple, like you filter out any non-alpha/numeric characters.... otherwise somebody may try to try some mischief
index.php?page=/etc/passwd
or even try to mess you up with a loop like:
index.php?page=index.php
- a clean switch case statement would be okay to prevent such stuff too....vaxorcist