您的位置:首页技术文章
文章详情页

html表单数据无法提交到php

【字号: 日期:2024-05-18 15:20:18浏览:83作者:猪猪

问题描述

源码如下,在html界面提交数据,php没有显示

<html> <head> </head> <body><?PHP $name=$error=''; if (empty($_POST["name"])){$error='empty'; }else{$name=$_POST["name"];$error=' no empty'; }?> <from action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">名字<input type="text" name="name" value=""><br><input type="submit" name="提交" value="提交"><input type="text" name="display" value="<?php echo $error; ?>"><?php echo $_POST['name']?> </from> </body></html>

问题解答

回答1:

不是from,form才对

标签: HTML
相关文章: