PHP Hyperlink

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
silent_assassin
Forum Newbie
Posts: 8
Joined: Mon Mar 20, 2006 5:47 pm

PHP Hyperlink

Post by silent_assassin »

I am a complete PHP novice, and have never really done much in it before. I have spent hours looking on the internet for this but cannot find anything.

I am wanting to create a link between pages on my site.

Instead of linking the page such as page.php, page2.php etc I want it so that the link is like index.php?page or something like that, but I have no idea how to do it at all.

If someone could help that would be great.

Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you'll be using the $_GET superglobal array to retrieve the page reference information. From there, you should validate the page requested against a whitelist or something. If the page requested fails the whitelist, include the default page content.
silent_assassin
Forum Newbie
Posts: 8
Joined: Mon Mar 20, 2006 5:47 pm

Post by silent_assassin »

Don't suppose you would be as good as to post an example....I aint primarily a coder.

Cheers
Post Reply