PHP conditional help
View Single Post
09-18-2005, 02:10 AM
Join Date: Jul 2005
I'm not completely sure I know what you mean by page address. But for example, if you have:
Then you can create a conditional statement like:
if((!empty($_REQUEST['page'])) && ($_REQUEST['page'] == 'x'))
// Show page x
elseif((!empty($_REQUEST['page'])) && ($_REQUEST['page'] == 'x'))
// Show page xy
But more likely, you'll want to accept multiple values for 'page' and pull them from a database or file.
Then you'd want to simply check for page, validate page with whatever parameters you require, then load page from DB or disk, and display.
// Do whatever with $_REQUEST['page']
// Default behavior
Maine Web designs
and Wordpress development by Intavant.
View Public Profile
Send a private message to Tekime
Visit Tekime's homepage!
Find More Posts by Tekime