Re: auto-input data into form boxes
| From: | Kunal Jhunjhunwala | Date: | Wed, 15 Aug 2001 20:26:42 +0000 |
| Subject: | Re: auto-input data into form boxes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62901@lists.php.net to get a copy of this message | ||
Hi,
Try this,
<?php
include("datafile.php");
print "<form action=test2.php method=get>";
print "<center><input type=text name="alpha" value="$alpha"
size=5></center><br>";
print "<center><input type=text name="numb" valus ="$numb"
size=5></center><br>";
print "<center><input type=submit value=Do_It!></center>";
print "</form>";
?>
Kunal
----- Original Message -----
From: "Hugh Danaher" <hdanaher@earthlink.net>
To: "Php-General" <php-general@lists.php.net>
Sent: Thursday, August 16, 2001 1:53 AM
Subject: [PHP] auto-input data into form boxes
I need professional help!
I need to make a form that will display old data in the form boxes, wait for
user input (if they want to change something), and then go on to another
page. This is what I have now, and it doesn't work:
datafile.php
<?php
$alpha="Alpha";
$numb="46";
?>
inputpg.php
<?php
include("datafile.php");
print "<form action=test2.php method=get>";
print "<center><input type=text name=".$alpha."
size=5></center><br>";
print "<center><input type=text name=".$numb."
size=5></center><br>";
print "<center><input type=submit value=Do_It!></center>";
print "</form>";
?>
test2.php
<html>
<body>
<?php
print "This is alpha".$alpha;
print "<br>this is numb".$numb;
?>
</body>
</html>