PHP表格给了一些错误
< html>
< body>
< form action ="welcome.php" method ="post">
名称:< input type ="text" name ="fname"/>
年龄:<输入type ="text" name ="age"/>
<输入type ="submit" name ="submit"/>
</form>
</body>
</html>
* welcome.php *
<?php
if(isset($ _ POST ["age"]))
{
echo"hi!".$ _ POST ["fname"].< br/&" ;;;
回声我们的年龄是".$ _ POST ["age"];
}
其他{
< html>
< body>
< form action ="welcome.php" method ="post">
名称:< input type ="text" name ="fname"/>
年龄:<输入type ="text" name ="age"/>
<输入type ="submit" name ="submit"/>
</form>
</body>
</html>
}
?>
<html>
<body>
<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" name="submit" />
</form>
</body>
</html>
*welcome.php*
<?php
if(isset($_POST["age"]))
{
echo "hi !".$_POST["fname"]."<br/>";
echo "ur age is".$_POST["age"];
}
else{
<html>
<body>
<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" name="submit" />
</form>
</body>
</html>
}
?>
_POST ["age"])))
{
回声嗨!".
_POST["age"]))
{
echo "hi !".
_POST ["fname"].< br/>";
回声我们的年龄是".
_POST["fname"]."<br/>";
echo "ur age is".
_POST ["age"];
}
其他{
< html>
< body>
< form action ="welcome.php" method ="post">
名称:< input type ="text" name ="fname"/>
年龄:<输入type ="text" name ="age"/>
<输入type ="submit" name ="submit"/>
</form>
</body>
</html>
}
?>
_POST["age"];
}
else{
<html>
<body>
<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" name="submit" />
</form>
</body>
</html>
}
?>