Jump to content


Photo

Display dynamic text to a textfield


  • Please log in to reply
2 replies to this topic

#1 Kcgame

Kcgame
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 20 February 2005 - 11:41 AM

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 :)

#2 Gary Tactic

Gary Tactic
  • Members
  • Pip
  • Newbie
  • 8 posts
  • LocationUK, Bristol

Posted 22 February 2005 - 10:03 AM

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">



#3 Kcgame

Kcgame
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 23 February 2005 - 12:20 PM

Thanks Gary!
Its 100% what i want :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users