Re: urlencode problem

From: Date: Wed, 03 Jan 2001 17:02:06 +0000
Subject: Re: urlencode problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32518@lists.php.net to get a copy of this message
On Wed, 3 Jan 2001, Javier Leyba wrote: > > Hi All ! > > I have the following problem with a text that I submit to another pages from a form. > > In my form I've an input text field to put words to search in a database. > If I write (in the field search_word) and submit the form (with POST method) the following > text: > > +diego +maradona > > > In the next page (pag1.php that receive the form) I see in the url: > > pag1.php?search_word=%2Bdiego+%2Bmaradona > > > As it's ok. I generate the new page with a link to pag2.php as follows: > > <a href=\"pag2.php?&search_word=". > $search_word."\"">link</a> > > > If I click on the link, I go to the page pag2.php and I see in the url: > > pag2.php?search_word=+diego%20+maradona > > > Who the hell transform the original text %2Bdiego+%2Bmaradona to +diego%20+maradona. I need the > text to continue the search but search results never will be the same if the text change across > pages. > > Could somebody help me ? > > Thanks in advance. > > Javier > Try: "<a href=\"pag2.php?&search_word=".urlencode($search_word)."\"">link</a>" -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.general (#32518) next »