Results 1 to 5 of 5

Thread: $input = urldecode($_SERVER['QUERY_STRING']);

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2002
    Posts
    159

    $input = urldecode($_SERVER['QUERY_STRING']);

    Deleted
    Last edited by NOTSOSURE; Mar 28th, 2006 at 10:39 AM.

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: $input = urldecode($_SERVER['QUERY_STRING']);

    $input = urldecode($_GET['textarea']);

    or (but less eficient)

    $input = preg_replace('#textarea=(.*)&#si', '$1', urldecode($_SERVER['QUERY_STRING']);

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: $input = urldecode($_SERVER['QUERY_STRING']);

    The $_GET and $_POST arrays are urldecoded automatically.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4
    Addicted Member
    Join Date
    Nov 2004
    Posts
    144

    Re: $input = urldecode($_SERVER['QUERY_STRING']);

    if i used the POST method of passing variables how would i grap the information from the address bar using

    $input = preg_replace('#textarea=(.*)&#si', '$1', urldecode($_SERVER['QUERY_STRING']);

    thanks

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: $input = urldecode($_SERVER['QUERY_STRING']);

    Post vars do not go through the URL You would have to use $_POST or $_REQUEST. And Adam is right the $_GET array is automatically decoded. I forgot about that.

Posting Permissions

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



Click Here to Expand Forum to Full Width