This is a discussion on "[SOLVED] making sure characters saved to db remain in the long version, like '£" within the PHP Forum section. This forum, and the thread "[SOLVED] making sure characters saved to db remain in the long version, like '£ are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] making sure characters saved to db remain in the long version, like '£
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] making sure characters saved to db remain in the long version, like '£
hi there, I have a cms and whenever I save a character like £ to the db and then retrieve it to an editable field again, when it displays in the input, naturally it just displays the actual character and not the longwinded version.
I am wondering if there is a way around this? I don't like the idea of having to each time I want to save something back to the db doing some ereg_replace() script that changes everything as I'd like to keep the character input manual at this stage. Any ideas? |
|
|
|
|||
|
Re: making sure characters saved to db remain in the long version, like '£'
To keep it simple, when I save £ to a mysql table and retrieve it to a text input again, i'd like it to output as £ and not actually display the pound symbol.
|
|
||||
|
Re: making sure characters saved to db remain in the long version, like '£'
When you write the value to the form element use
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: making sure characters saved to db remain in the long version, like '£'
Nice one Rakuli. Thank you.
htmlentities($text) ended up doing the trick! |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] cookie does not get saved | thosecars82 | JavaScript Forum | 2 | May 23rd, 2008 12:13 |
| [SOLVED] fread only reading 78 characters | CloudedVision | PHP Forum | 2 | Apr 7th, 2008 20:50 |
| Read First 3 characters and last 4 characters of string | JustinStudios | PHP Forum | 2 | Apr 4th, 2008 00:01 |
| [SOLVED] not processing or just taking too long | saltedm8 | PHP Forum | 3 | Oct 17th, 2007 12:59 |
| [SOLVED] How To: Change characters in a textarea? Using Javascript | Anonymous User | JavaScript Forum | 0 | Feb 16th, 2005 12:34 |