php - 点击提交按钮没有响应
问题描述
这是我的代码。当我点击提交时。什么都没发生。没有错误或任何东西......
<form method="post" action="signup.php">
<div class="col-md-12">
<input type="text" name="uid" value="<?php echo "U-".rand(1000,9999).rand(100,999); ?>" hidden>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">User Type</span>
<select id="selectlog" name="utype" required>
<optgroup label="Select user type">
<option value="student" selected>Student</option>
<option value="teacher">Teacher</option>
<option value="parent">Parent</option>
</optgroup>
</select>
</div>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">School Level</span>
<select class="form-control" name="ulevel" autofocus="" required>
<optgroup label="SchoolLevel">
<option value="PrePrimaryEducatiuon" selected>PrePrimary Education</option>
<option value="PrimaryEducation">Primary Education</option>
<option value="SecondaryEducation">Secondary Education</option>
</optgroup>
</select>
</div>
<div id="" class="col-md-12 text-center">
</div>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">First Name</span>
<input type="text" placeholder="enter first name..." id="inputlog" name="fname" required>
</div>
<div id="login" class="col-md-6 text-center" hidden><span class="label label-default" id="inputlab">Middle Name</span>
<input type="text" placeholder="enter middle name..." id="inputlog" name="mname" required>
</div>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">Last Name</span>
<input type="text" placeholder="enter last name..." id="inputlog" name="lname" required>
</div>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">Email address</span>
<input type="email" placeholder="enter your email..." id="inputlog" name="umail" required>
</div>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">Phone Number</span>
<input type="tel" placeholder="enter phone number..." id="inputlog" name="uphone" required>
</div>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">Name of School</span>
<input type="text" placeholder="enter your school name..." id="inputlog" name="uschool" required>
</div>
<div id="" class="col-md-12 text-center">
</div>
<div id="login" class="col-md-6 text-center"><span class="label label-default" id="inputlab">Choose Password</span>
<input type="password" placeholder="enter preferred password..." id="inputlog" name="upass" required>
</div>
<div id="login" class="col-md-6 text-center" ><span class="label label-default" id="inputlab">Confirm Password</span>
<input type="password" placeholder="confirm password..." id="inputlog" name="upass2" required>
</div>
<div id="login" class="text-center col-md-12">
<button class="btn btn-info" type="submit" id="loginbtn" name="signup"><strong>SignUp</strong></button>
<p>Already have an account? <a class="text-danger" href="login.php"><strong> Login</strong></a></p>
</div>
</div>
</form>
解决方案
你的 signup.php 可以访问吗?这个方法是否接受 POST 请求?在此处检查双引号:
value="<?php echo " U-".rand(1000,9999).rand(100,999); ?>"
推荐阅读
- php - Symfony 5 symfony/dependency-injection 容器不按名称处理服务
- java - 了解 Spring Admin Server 的不同客户端类型
- node.js - 什么是 ?。java脚本中使用的符号?
- python - A* 寻路算法给出了路径,但它不是最短路径
- flutter - Swift 的 try 类似的语法是什么?在颤振?
- flutter - flutter: 如何使用官方的 webview_flutter 包下拉刷新flutter webview
- c# - Postsharp DTO 请求验证和控制器范围的验证异常处理
- awk - 用 awk 忽略 top 命令的前几行不起作用
- amazon-web-services - 如何从 Amazon S3 网站终端节点 URL 中删除区域?
- javascript - React.js MaterialUI:如何将 materiaUI 选择下拉列表的值与相关列表项值绑定?