i want the user to enter the name in the query and only after entering the name the next input text appears.
Unfortunately it doesnt work the way i want it to.
here is the code
<?php // formtest2.php
$flag = 0;
if (isset($_POST['name']))
{
$name = $_POST['name'];
$flag = 1 ;
}
else $name = "(Not entered)";
//echo <<<_END
?>
<html>
<head>
<title>Form Test</title>
</head>
<body>
<marquee> Your name is: $name </marquee> <br />
<form method="post" action="form1.php">
What is your name?
<input type="text" name="name" />
<input type="submit" />
</form>
<?php
if ( $flag == 0 )
{
<form method="post" action="form1.php">
What is your Uncle s NAme ?
<input type="text" name="name" />
<input type="submit" />
</form>
}
else
echo " wish u had written your name " ;
?>
</body>
</html>
I dont know where i am going wrong.