Jump to content

Archived

This topic is now archived and is closed to further replies.

Kcgame

Display dynamic text to a textfield

Recommended Posts

Hi,

 

I have a form and some PHP codes that look like;

 

<form name="realm_form" method="post" action="">

<input name="realm_field" type="text" value="" size="4" maxlength="4">

</form>

 

<?php

some more codes here

?>

 

and would like the realm_field to display the value of $final_Realm_no which i calculate from my PHP code. How do i refer to the textfield in PHP code? Is there something like

realm_form.realm_field=$final_Realm_no ?

 

Any help/advise is greatly appreciated.Thanks :)

Share this post


Link to post
Share on other sites

do you mean you want the value of that input to show $final_Realm_no?

 

if so you could simply just do...

 

<input name="realm_field" type="text" value="<? echo $final_Realm_no; ?>" size="4" maxlength="4">

 

 

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.