Page 1 of 1

Escaping characters in URL

Posted: Fri Mar 26, 2010 5:46 pm
by Big John
I have the following form:

Code: Select all

              
<form action="?" method="get">
     <fieldset>
          <input type="text" name="keyword" />
          <input type="submit" value="Search" id="search" />
      </fieldset>
</form>
 
It's for searching images in a gallery.But when I enter for example 'äõ', since it sends it to the same page, I get the URL index.php?keyword=äõ. When I select the URL and hit enter, then the URL changes to index.php?keyword=%E4%F5.
I want it to be like index.php?keyword=%E4%F5 the first time I enter 'äõ' and click the search button.

Thanks.

Re: Escaping characters in URL

Posted: Fri Mar 26, 2010 6:58 pm
by requinix
That's how it works. Unless you want to use some JavaScript to submit the form the way you want, just live with it.

Re: Escaping characters in URL

Posted: Fri Mar 26, 2010 8:57 pm
by Alkis
you can actually change the method from "get" to "post" and nothing appears on the url.

And to get the variables, instead of using the $_GET superglobals, use $_POST ones.