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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    433
    Thanks
    3
    Thanked 0 Times in 0 Posts

    php 4 _GET problem

    I have the following problem

    This php code dont print echo ' <br> I authorized einai ' . $_GET['$authorized']; tha variable when i set it on the url
    http://mysite.php?authorized=1

    I dont know why perhaps something is missing in php.ini..
    apache 2. php 4
    ubuntu 5

  • #2
    Regular Coder
    Join Date
    Jun 2005
    Posts
    804
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Data labels passed through GET or POST are array keys, not variables. Try

    PHP Code:
    echo ' <br> I authorized einai ' $_GET['authorized']; 

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Posts
    433
    Thanks
    3
    Thanked 0 Times in 0 Posts

    hnmmm..

    whats the difference between the line u have written with my new line?

  • #4
    Regular Coder
    Join Date
    Jun 2005
    Posts
    804
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The dollar sign. Your code is looking for an array element called "$authorized" instead of just "authorized".


  •  

    Posting Permissions

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