Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP, GET and POST '#' symbol

Status
Not open for further replies.

ebase

MIS
Jan 7, 2004
40
0
0
US
Hello,

We currently had one of our programmers create a simple web inventory search application. After searching for part numbers and returning results, you are allowed to 'ADD' parts that you want by email.

Before going on to the email form, the part numbers are sent using POST. The email form should display all of the parts that were added but part numbers with a '#' symbol do not show up. This works fine in IE but not in Firefox.

I am told by the programmer that Firefox uses the '#' symbol as a separator therefore nothing can be done. Is this true? I'm sure there are ways to work around this and any advice or information would be greatly appreciated.

Thanks,
Kei
 
Hi

what's the link to php here?

in any event, it seems easy enough to strip out the hash sign in javascript.
 
The # symbol is indeed a special symbol in url query strings.

However there's no reason it would interfere in FF or IE, as both browsers automatically convert the symbol into its html entity equivalent of "[ignore]%23[/ignore]"

Furthermore the interference would only occur if your form submits using the GET method, and for whatever reason puts the # symbol directly into the url.

If your form uses the POST method there would be no interference in any scenario.

Without seeing any relevant code of what your form is doing with the values, its impossible to suggest any fix.





----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Thank you all for the replies. I was able to fix the problem using urlencode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top