Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    Scotland
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP isn't reading variables from URL's.

    I installed PHP 4.3.6 on my home computer (Win XP Home) for the sake of making PHP and MySQL development a lot easier.

    For some strange reason if I pass a variable throught a URL (e.g. <a href='index.php?target=pictures'>) PHP doesn't seem to acknowledge that $target exists. I turned on error display and it gave me a warning that there was an unknown variable called target.

    Even if I type the address in (not that I expected it to make any difference) the same warning is given.

    What can I do?

  • #2
    Regular Coder
    Join Date
    Feb 2004
    Location
    Scotland
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I had register_globals turned off in php.ini.

    To resolve this I used $_GET['target']


  •  

    Posting Permissions

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