![]() | |
| ||||
| The situation is, im using a normal HTML in a PHP page, the problem is when i add text to the textarea and submit it to the DB and when i query it to show up on the next page the <br>(these tags are entered manually into the textarea before submitting) show up in the text and the characters show up also anything after a double quote is not stored into the DB, the field is defined as a text type! Any help would be much appreciated as always. |
| ||||
| are you using mysql_escape_string()?
__________________ |
| ||||
| Quote:
|
| ||||
| Quote:
Your insert code should look like this: PHP Code:
__________________ |
| ||||
| Quote:
PHP Code: |
| ||||
| Quote:
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - Botswana Safaris |
| ||||
| They should be fine, you have to be logged in and have admin right then to even view the pages! I read something about putting '<br>' tags into textareas and then not being the right encoding type but i have the same thing setup on another site and it will accept these tags and double quotes etc no problem, cant seen to figure it out!? |
| ||||
| You shouldn't need the stripslashes function or the addslashes function when you are using mysql_escape_string function.
__________________ |
| ||||
| Ok, i'll have a look at it when i get home, thanks. |
| ||||
| Ok, still not working, if i add data directly to the DB is shows up fine but if i add it via a webpage or edit it via a webpage either slashes start showing up, everything after double quotes disappears or the html tags are converted from '<br> to '<br>'! I'm not understanding this mysql_escape_string function, wheres it ment to go, before data enters the db or after or what does it even do, tried php.net but sometimes they word things difficult enough!? |
| Thread Tools | |
| Display Modes | |
|
|
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ruby on Rails VS PHP Code Igniter | gav240z | Coding Help | 10 | 03-02-2008 11:04 PM |
| PHP Wierdness | elspudo | Coding Help | 3 | 18-12-2007 07:49 PM |
| form sending without php | Joseph Grogan | Coding Help | 5 | 05-09-2007 01:32 PM |
| PHP, OOPS! data typing | Mike | Coding Help | 2 | 24-08-2007 02:44 PM |
| WTF - Some PHP Obfuscation. | daviddoran | General Chat | 8 | 20-02-2007 04:45 PM |