| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Jan 2007
Posts: 98
![]() | Apostrophe and line break problems When I try to insert a sentence with an apostrophe or line break to the database I get an error. PHP Code: What can I do to solve this problem? Thanks all. |
| |
| | #2 (permalink) |
| Domains my Dominion Join Date: Aug 2005 Location: Web 1.0
Posts: 9,558
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Hi, You should really take the time to read this to understand how to escape special characters (and avoid SQL injections problems too): http://php.net/mysql_real_escape_string
__________________ NameNewsletter.com - free lists of available domain names ZoneFiles.net (beta) - ccTLD and gTLD droplists |
| |
| | #3 (permalink) |
| Senior Member Join Date: Aug 2005 Location: East Yorkshire, England
Posts: 2,689
![]() ![]() ![]() ![]() ![]() ![]() ![]() | yes, always escape your variables. PHP Code: |
| |
| | #4 (permalink) | ||||
| NamePros Regular Join Date: Oct 2006
Posts: 963
![]() ![]() |
| ||||
| |