Php方法=" post"没有在表单操作上执行

编程入门 行业动态 更新时间:2024-10-28 06:22:13
本文介绍了Php方法=" post"没有在表单操作上执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个带有html表格的php文件

i have a php file that has a html form

<form action="CustomerLoginHTML.php" method="POST">

一旦按钮点击甚至执行表格就应该执行里面的php文件。 但不执行php部分,但是为什么呢? 我尝试过的事情:

once the button click even perform the form should execute the php file inside it. but it dose not execute the php part, but why? What I have tried:

<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <title>Sign in</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="CSS/SSLoginGen.css"> </head> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['login'])) { //user logging in require 'Custlogin_Dbchk.php'; } else{ $message = "wait for it"; echo "<script type='text/javascript'>alert('$message');</script>"; } } ?> <body> <form action="CustomerLoginHTML.php" method="POST"> <center> <div class="loginbox"> <h1>Customer Login</h1> <input type="username" name="username" id="username" placeholder="Username" required/><br><br> <input type="password" name="password" id="password" placeholder="Password" required/><br><br> <input type="button" value="LOGIN" name="login"/><br><br> <a href="ResetPW.php" style="color:whitesmoke">Forgot your Password?</a><br><br> <a href="index.php"><input type="button" value="BACK TO HOME" id="home"/></a> </div> </center> </form> </body> </html>

推荐答案

_SERVER ['REQUEST_METHOD'] =='POST') { if(isset( _SERVER['REQUEST_METHOD'] == 'POST') { if (isset(

_POST ['login'])){//登录 的用户需要'Custlogin_Dbchk.php'; } else { _POST['login'])) { //user logging in require 'Custlogin_Dbchk.php'; } else{

message =等待它; echo< script type ='text / javascript'> alert(' message = "wait for it"; echo "<script type='text/javascript'>alert('

更多推荐

Php方法=&quot; post&quot;没有在表单操作上执行

本文发布于:2023-10-10 11:59:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1478611.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   操作   方法   Php   amp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!