lucerias Posted November 2, 2006 Share Posted November 2, 2006 I have created a form like below, after i click on the generate button, it will run the generate.php and generate a new sum based on the input, Number. Finally i want to display the sum back in the field of the previous html form field. What code should i include in the php to ask it return back and pass the value to that page. Thank you.<form action="Generate.php" Method=POST><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr><td width="20%">Number:</td><td width="30%"><input name='Number' type="text" tabindex='3' size='10' maxlength='17' value="Enter here"> <b>kg</b></td></tr> Quote Link to comment https://forums.phpfreaks.com/topic/25896-output-from-php-to-form/ Share on other sites More sharing options...
fenway Posted November 2, 2006 Share Posted November 2, 2006 You just need to echo the variable in the value attribute of your input field. Quote Link to comment https://forums.phpfreaks.com/topic/25896-output-from-php-to-form/#findComment-118601 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.