Results 1 to 2 of 2

Thread: basicvariable help

  1. #1
    Join Date
    Dec 2005
    Posts
    1

    basicvariable help

    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

  2. #2

    Post

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •