Posted by Stefan Mueller on 09/25/73 11:32
>>I've an input box like
>> <input type = "hidden" name = "MyBox" value = "">
>>
>>Now I'd like to add some text to this input box with PHP.
>>How can I do that?
>
> <input type = "hidden" name = "MyBox" value = "<? echo $MyValue; ?>">
Actually I'm looking for a solution to add some text to an input box which
already exists.
In JavaScript I do it with
document.MyForm.MyBox.value = "some text";
But how can I do that within PHP?
Stefan
PS: To transfer the content of a PHP variable to a JavaScript variable with
$MyJSVariable = <?echo $MyPHPVariable; ?>
doesn't work. Mozilla Firefox's JavaScript Console says syntax error at '<?'
I've to do that within JavaScript. Correct? I'm a little bit surprised why
your JavaScript variable has a '$' at the beginning.
Navigation:
[Reply to this message]
|