OK, I’m not good with PHP...so this problem might be an easy fix.
The problem is: I am working with eForm2db and I want the user to be able to enter an apostrophe in their name (i.e. "O’Brien") without throwing a parse error. I’m know the problem is when it is trying to write to the DB, but I have no clue on how to fix it...
Any ideas or solutions?
Cheers!
You should really ask this question in the eform2db thread. As far as I know an apostrophe (or single quote) shouldn’t give you any hassle in eForm itself and in eform2db you need to make sure you properly escape the input. You can use $modx->db->escape() for that.
-
☆ A M B ☆
- 24,524 Posts
In fact, you should get in the habit of doing that with all user input, as it helps a bit to prevent security breaches.