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"" <[EMAIL PROTECTED]> wrote in message
9go2fi$q1h$[EMAIL PROTECTED]">news:9go2fi$q1h$[EMAIL PROTECTED]...
> 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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]