Dear Sir,
I have following codes
<?php
$var2="";
$name="";
if (isset($_POST['button1']) && !empty($_POST['text1'])) {
$name=$_POST['text1'];
if ($name=="1") {
$var2="1";
}else{
$var2="0";
}
}
?>
<html>
<head>
<title>
First form
</title>
</head>
<body>
<form name="aa" action="textboxes.php" method="Post">
First<input type="text" name="text1" value=""><br>
Second<input type="text" name="text2" value="<? echo $var2; ?>" disabled><br>
<input type="submit" value="Display" name="button1">
</form>
</body>
</html>
If I enter 1 in text1 then text2 must show 1 else text2 must show 0
Please see what is wrong in my codes.
Thanks