This is a part of a larger script.
<?php
function display_form()
{
echo "<form action=login.php3 method=post>";
echo "Login Name:<input type=text name=login value=$login>";
echo "<input type=submit name=submit value=Login></form>";
}
...
display_form();
?>
What the above does is that it displays the form WITHOUT the login field already filled in with $login.
However, if I do not use a function to display the form, that form is shown with the login field filled in as expected.
I have many scripts that require forms to be displayed several times depending on the condition. So not being able to use a function to display the form makes the script really large and unprofessional.
Can somebody tell me why the function does not display a form with the data already filled in? Thanx.
Richie.