[SOLVED] Apostrophe headaches |
5/30/2012 4:47:43 PM |
PHPRunner General questions | |
![]() I resolved one problem recently by modifying my query to WHERE users_usr.nam usr = '".db_addslashes($_SESSION['UserID'])."'");
|
|
P
|
procheck 5/30/2012 |
You're probably looking at using mysqli_real_escape_string(). It could be a lot of work. You could disallow apostophes but that might be unacceptable for your application. |
![]() |
Admin 5/30/2012 |
You should prevent unwanted characters in your database. Add validation to those text fields to allow entering numbers only. Another option is to use masked edit control. |
![]() |
bbarker author 5/30/2012 |
You should prevent unwanted characters in your database. Add validation to those text fields to allow entering numbers only. Another option is to use masked edit control.
|
![]() |
Admin 5/30/2012 |
I assumed that you were talking about a numeric field. |
![]() |
bbarker author 5/31/2012 |
....Probably you are talking about some other characters i.e. about curly quotes that Word uses instead of normal double quotes. You will need to convert those curly quotes to their HTML representation. Probably the best option for you is to use Rich Text Editor option for editing and 'View as' type HTML. More info about handling curly quotes in HTML: http://www.dwheeler.com/essays/quotes-in-html.html
|
![]() |
bbarker author 5/31/2012 |
I added the Basic Rich Text Editor-- and it allowed me to replace all of the offending QUOTES and APOSTROPHES. |