I have two page that each of them has one form. something like this:
// index.php
<form name="SampleForm" method="get" action="search.php">
<input id="q" name="q" type="text"/> // text field
<input name="" type="submit" /> // button
</form>
// search.php
<form name="SampleForm" method="get" action="">
<input id="q" name="q" type="text"/> // text field
<input name="" type="submit" /> // button
</form>
Now, when I submit index.php the URL is something like this:
www.example.com/search.php?q=foo+bar
but when I submit search.php the URL is something like this:
www.example.com/search.php?q=foo%20bar
Why ? and how can I fix it ? (I want just +)
Edit:
index.php to search.php is not ajax, but search.php to search.php is ajax. that's true, the reason of changing + to %20 is redirecting. so, is it possible to I convert from %20 to + in a redirected page ?