Re: Strings with Spaces in URLS

From: Date: Wed, 22 Aug 2001 08:16:01 +0000
Subject: Re: Strings with Spaces in URLS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63873@lists.php.net to get a copy of this message
On Wednesday 22 August 2001 03:05, Chris Aitken wrote: > I have come up with a bit of a problem.... > > I have a little funky search form on a page, and when I send the search > data on as a URL, anything with a space is screwed up.... example > > $search = "This is a test"; > echo "<a > href=http://www.blah.com/foo.php?search=$search>"; > > and when the link is clicked (or even when the mouse is put over the > link), the URL in the browser is - > > http://www.blah.com/foo.php?search=This > > leaving out all words after the first space. http://php.net/urlencode http://php.net/rawurlencode -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. - Edsger W. Dijkstra

« previous php.general (#63873) next »