Use £ ?
Is that what you mean?
Ta
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
Regards
They came for my 404 and I said nothing
Use &pound; ?
Is that what you mean?
Ta
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
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![]()
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
Had that similar problem and it took me ages as well![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks