|
Posted by Oli Filth on 09/06/05 01:45
David said the following on 05/09/2005 23:06:
> Ok. Can PHP control a form value directly? Eg. like the javascript
> "document.Form1.text01.value = "Y"". Eg. allow me to put a value into
> a form text field on page load. Either I missed this in my PHP book
> or the function does not exist.
PHP is server-side, so it has no control of the form, other than the
HTML/Javascript/etc. that is sent to the browser.
>
> The only way I have seen is to put code in the value part of the input
> item, see below.
>
>
> <input type="text" value = "<? echo sprintf("%01.2f",
> $TotalCost);?>"/>
So this (and variants) are the only way of doing this.
--
Oli
Navigation:
[Reply to this message]
|