grabbing the .php= variable?

Discussion in 'PHP' started by lilac2, Aug 21, 2008.

  1. #1
    Hi

    If I have a page that is index.php but if I type index.php?a=cat can I get it to print "cat" on the screen without using SQL? Is there a method to extract the a= content with PHP alone?


    Thanks
     
    lilac2, Aug 21, 2008 IP
  2. olddocks

    olddocks Notable Member

    Messages:
    3,275
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    215
    #2
    just echo it

     
    olddocks, Aug 21, 2008 IP
  3. lilac2

    lilac2 Peon

    Messages:
    367
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks! It worked
     
    lilac2, Aug 21, 2008 IP
  4. nice.wallpapers

    nice.wallpapers Active Member

    Messages:
    142
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Hi ,

    You can use both print / echo .

    print $_GET['a'];
    or
    echo $_GET['a'];

    Thanks :)
     
    nice.wallpapers, Aug 21, 2008 IP