DEPearson wrote:
> I am new to PHP from the ASP world. I am working on a
shopping cart where, I
> am passing item name via the querystring to the
processcart.php file. It works
> great until I place a # sign in the item name. Is there
a right way to handle
> strings with # signs in the middle of them.
PHP can handle # in a string without problems. The mistake
that you're
making is to pass # through a query string. In a URL, #
indicates a
named element inside the page. To use # as a character that
is preserved
as a literal value, you need to urlencode it. You can either
do that
with the urlencode() function. It's probably simpler to use
the
urlencoding directly: %23 represents #.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/