form标签中,用到action属性和post方法;form标签之间,最后需要一个type为submit的input标签来提交表单。type为text的input标签可设置name属性值,该值可被相应的php页面接收,需要在.php文件中写代码实现。
<form action="名字.php" method="post"> <input type="text" name="lqw"> <input type="submit"> 点击提交后,就会跳转到welcome.php页面处理 </form>
Welcome <?php echo $_POST["lqw"]; ?><br> Your email address is:
echo用来显示输出,$_POST[""]; 语句用来获取input标签中相应name属性值的input内容(由用户输入)。