Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:03 am EST
Geeklog Forums
preserving single quotes on the custom form
Status: offline
mjh55_98
Forum User
Newbie
Registered: 02/28/06
Posts: 4
i am trying to add additional fields via custom form registrtion. I realized when i was testing that if i use a single quote...in the data..anything after the single quote disappears when it is entered into mysql....
does anyone have a suggestion???
I have applied addslashes and com_applyfilter functions..but they did not work....I do not have anything else to try..thanks
does anyone have a suggestion???
I have applied addslashes and com_applyfilter functions..but they did not work....I do not have anything else to try..thanks
7
5
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
COM_applyFilter is actually the function that will cut off your input at the first quote.
If you need content that contains quotes, you have to carefully filter it yourself. Applying addslashes before writing it into the database is a good start, but depending on what sort of content it is, you may also need to filter for HTML, for example.
bye, Dirk
If you need content that contains quotes, you have to carefully filter it yourself. Applying addslashes before writing it into the database is a good start, but depending on what sort of content it is, you may also need to filter for HTML, for example.
bye, Dirk
7
10
Quote
Status: offline
mjh55_98
Forum User
Newbie
Registered: 02/28/06
Posts: 4
thanks for the quick reply.
I was curious, do you have any examples ?
If I should use addslashes when entering data into geeklog db, do I have to use anything when i am bring it out of the db ???
Further, did you know that if i create a user account with single quote..i get an sql error?? I have to remove the single quote to create the account.
I was curious, do you have any examples ?
If I should use addslashes when entering data into geeklog db, do I have to use anything when i am bring it out of the db ???
Further, did you know that if i create a user account with single quote..i get an sql error?? I have to remove the single quote to create the account.
5
6
Quote
All times are EST. The time is now 01:03 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content