PDA

View Full Version : basicvariable help



softz
29 Dec 2005, 06:06 PM
hey guys

what i need to do is this:

when i click on a link in my menu the address in the addy bar changes to:
index.php?page=Directory ...etc

and i need to be able to get what ?page=directory says
so i the word that appears there to be sent to a variable which i can use in my scripts, so i want directory sent to a variable
but when i go to a different page that mite be index.php?page=Help
i want help to replace the variable which is currently holding directory from above

if you follow me...
it would be of great help
thanks

crybaby
30 Dec 2005, 03:45 PM
Hi,

If you are using PHP you are able to get the variables from the query string using:

$_GLOBAL['page']

or $_GET['page']

For example:

$mysql_query = "SELECT * FROM pages WHERE page_name = `$_GET['page']` LIMIT 1";


Hope this is of some help.