Re: One quick favor!!!!!!

From: Date: Tue, 19 Jun 2001 19:48:03 +0000
Subject: Re: One quick favor!!!!!!
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9636@lists.php.net to get a copy of this message
Each '%20' is a URL-encoded space character. In other words, the string you are getting back from your database query looks like 'fruit '. I suspect you coded the field as a fixed-length string. The best long-term fix is to change the field type to a variable-length string, so that 'fruit' is returned without trailing spaces. For a quick stop-gap, look at the PHP function trim(). ""Scott Fletcher"" <scott@abcoa.com> wrote in message news:9go2fi$q1h$1@w153.z064000151.sjc-ca.dsl.cnc.net... > When I get the data from the database and put it into the "<a href=""></a>" > code and use it in the post form, "<form .......> ..... </fom>". And so on. > When I click the hyperlink to go to the next page, I saw the ugly code in > the URL address section of the web browser's window. It said, > "http://*****/test_final/cart/cart_index.php?menu=category&category=fruit%20 > %20%20%20%20%20%20%20%20%PHPSESSID=0E731DE82293C1E5FE524448731F7006". > > How do I got rid of hte "20%" data since I only have the word,"fruit" > from the database table. I suspect that it have to do with the HTML form > post and get method. How do I get rid of it??? > > Thanks! > Scott

« previous php.db (#9636) next »