The problem is with your input page. You're putting the variable values
where the names go

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

Try this

inputpg.php
    <?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\" value=\"$numb\"
size=5></center><br>";
    print "<center><input type=submit value=\"Do_It!\"></center>";
    print "</form>";
    ?>

Data Driven Design
1506 Tuscaloosa Ave
Holly Hill, Florida 32117

http://www.datadrivendesign.com
Phone: (386) 226-8979

Websites That WORK For You
----- Original Message -----
From: "Hugh Danaher" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Wednesday, August 15, 2001 4:23 PM
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>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to