-
16-01-07 #1
Registered User
- Join Date
- Feb 2006
- Location
- Gillingham
- Posts
- 511
- Thanks
- 0
- Thanked 4 Times in 1 Post
help displaying £ in input form
Hi I'm working on a currency database and have a input form to edit how each currency is displayed.
However if I input "£" or "€" The actual symbol appears in the input form.
eg <input value="£" /> displays a box with the £ sign and not the long form.
Any ideas how I can get round this?
Any help would be appreciated
RegardsThey came for my 404 and I said nothing
-
16-01-07 #2
Typing with both fingers.
- Join Date
- Aug 2003
- Location
- Allt Y Coed Farm, North Pembrokeshire
- Posts
- 3,834
- Thanks
- 215
- Thanked 143 Times in 108 Posts
Use &pound; ?
Is that what you mean?
Ta
-
16-01-07 #3
Registered User
- Join Date
- Feb 2006
- Location
- Gillingham
- Posts
- 511
- Thanks
- 0
- Thanked 4 Times in 1 Post
The input form value is taken from a database.
so the input line is actually:
The output is then sent back into the database.PHP Code:<input name="id" type="hidden" value="<?php echo $key?>">
<input name="currency" type="text" size="20" value="<?php echo $currency[$key]['currency']?>" maxlength="20">
The value $currency[$key]['currency'] is the display form of the currency eg £ and is used to convert the ISO code "GBP" (id in input form) in the datafeed to display the correct currency.They came for my 404 and I said nothing
-
16-01-07 #4
Typing with both fingers.
- Join Date
- Aug 2003
- Location
- Allt Y Coed Farm, North Pembrokeshire
- Posts
- 3,834
- Thanks
- 215
- Thanked 143 Times in 108 Posts
Maybe I am not getting what you need, however I will have a go.
To display £ in a form field you will need to have the source code:-
<input value="&pound;" />
or your example:-
PHP Code:<input name="currency" type="text" size="20" value="<input value="<?php echo str_replace('&','&'$currency[$key]['currency'])?>" />" maxlength="20">
When submitted you will have to catch it and change & back to just & then convert it back to your ISO codes.
Sorry if this is not what ya need
-
16-01-07 #5
Registered User
- Join Date
- Feb 2006
- Location
- Gillingham
- Posts
- 511
- Thanks
- 0
- Thanked 4 Times in 1 Post
Cheers the answer was so simple!! But I've spent hours trying to get round the problem.
All sorted now I can get back to work.
Thanks again.They came for my 404 and I said nothing
-
16-01-07 #6
Typing with both fingers.
- Join Date
- Aug 2003
- Location
- Allt Y Coed Farm, North Pembrokeshire
- Posts
- 3,834
- Thanks
- 215
- Thanked 143 Times in 108 Posts
Had that similar problem and it took me ages as well
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Form spam problem
By mibut in forum ProgrammingReplies: 16Last Post: 07-02-07, 02:22 AM -
Form spammers - what to do!
By smn2 in forum Affiliate Marketing LoungeReplies: 4Last Post: 12-09-06, 03:42 PM -
Form text area help - displaying UTF-8 characters
By Barry in forum ProgrammingReplies: 1Last Post: 24-02-06, 01:17 PM -
Finance leads: own form vs merchants form
By hiptophop in forum Affiliate Marketing LoungeReplies: 0Last Post: 29-09-05, 02:44 PM -
Lost password form on CJ website
By woutermols in forum Commission Junction - CJ UKReplies: 0Last Post: 30-03-05, 07:18 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks