您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

如何用PHP实现表单提交?

2025/2/17 0:49:29发布23次查看
如何用php或javascript实现如下功能:将一个1.html(php)中表单form1内输入的数据提交到另外一个网页2.html(php)或txt文本中,
解决方案:
创建go.php,代码如下
<?php @$username = $_post['name']; @$usermessage = $_post['message']; if(!empty($username) || !empty($usermessage)){ echo "您的姓名:".$username.",您的留言内容:".$usermessage; } else{ echo '<form action="go.php" method="post"> 您的姓名:<input type="text" name="name"> <br><br> 留言内容:<input type="text" name="message"> button>提交</button></form>'; } ?>
案例截图:
以上就是如何用php实现表单提交?的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product