why i cannot get the value from $_Get if the value has http

Discussion in 'PHP' started by tvshock, Dec 14, 2009.

  1. #1
    hello

    i want to ask something about GET function. example like this

    if i set the value like this

    //////////// error/////////////
    http://www.hotsmusic.com/index.php?value=http://www.example.com/

    and i try grab using $_GET['value']; it not work.

    ////////////////////////////////

    but when i make something like this


    http://www.hotsmusic.com/index.php?value=www.example.com/

    $_GET['value'];

    it work

    why if i cannot sent value with http infront. it work when i use xampp on my computer but when i testing on server like hostgator it will show an error.
     
    tvshock, Dec 14, 2009 IP
  2. b4x

    b4x Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can You show me result of:

    
    var_dump ($_GET);
    
    PHP:
    Try urlencode and urldecode
     
    b4x, Dec 14, 2009 IP
  3. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #3
    yups, urlencode will help in such case. its simple and straight solution.
     
    mastermunj, Dec 14, 2009 IP