| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Regular | Another PHP problem I'm writing my first major site using a database and php. Of course I keep running into things I don't know yet. So here is my latest problem. I'm working on an article submission and get an error anytime there is a ' , " : ; and other common punction. I know I need to do something in the processing part of the code. Help please?
__________________ Four Seasons Outfitters [ 25 $NP/Month ] [ 25 $NP/Month ] [ 25 $NP/Month ] [ 25 $NP/Month] [ 25 $NP/Month] |
| |
| | #2 (permalink) |
| Senior Member | put a \ infront of each special character.
__________________ ----------------------------------------------------- |-----FREE BANNER EXCHANGE! 1:1 RATIO!!!!-----| |-------------www.bannercenter.info-------------| ----------------------------------------------------- |
| |
| | #3 (permalink) |
| Senior Member | if the error is occuring when you try and input them into the database you can use mysql_real_escape_string() if you are using mysql (there are similar functions for other databases) In addition if the string is to be displayed on a web page then you could also run it through htmlentities() which will stop the browser processing any html instead of displaying it. |
| |
| | #4 (permalink) | ||
| NamePros Regular | Quote:
Quote:
__________________ Four Seasons Outfitters [ 25 $NP/Month ] [ 25 $NP/Month ] [ 25 $NP/Month ] [ 25 $NP/Month] [ 25 $NP/Month] | ||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Annual Christmas Sale @ Erudnet | Hot Deals | PHP 5 HOSTING! | iNod | Web Hosting Offers | 0 | 12-01-2005 07:51 PM |
| Problem with PHP | monRa | Programming | 15 | 09-12-2005 04:28 AM |
| local server installations, urgent help needed. | Porte | Web Hosting Discussion | 1 | 06-23-2005 03:05 PM |
| PHP Problem on a website? | aal814 | Web Design Discussion | 1 | 12-29-2004 10:53 AM |