How can i insert # sign into the database? Do i have to use a different collation?
Also cannot pass both & and # signs through the ajax url to the php file, any work around that excepting for replacing it with delimiters?
Printable View
How can i insert # sign into the database? Do i have to use a different collation?
Also cannot pass both & and # signs through the ajax url to the php file, any work around that excepting for replacing it with delimiters?
Remember that & and # are URL string delimiters. You have to URL encode/decode them.
How would i do that?
I mean lets say in my query i have a certain text field which contains #
Do you mean i should urlencode('#1 Fan Image'); ??Code:$qry = "insert into xyz values(null, '#1 Fan Image')";
and while retrieving it decode it?
would it have an adverse effect if the string did not contain any special characters, i mean i donot want to search for a special character and encode it only on its existance.
Use JavaScript's encodeURI() to pass it through the AJAX call. Then, use PHP's urldecode() on just the variable for the query string.
So are you only sending as POST and not GET?Quote:
encodeURI would not affect inputing special characters into the database at all if you remembered to decode them on the server-side...as I suggested.Quote: