在PHP中注册注册按钮时如何消除此错误 [英] How do eliminate this error when signup button is hit in PHP
本文介绍了在PHP中注册注册按钮时如何消除此错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试制作一个注册表单,但问题是
,当我按下按钮时,它将转到我的
注册源和浏览器中的以下内容
first = francis& last = chijioke& uid = alert& pwd = 1234
我尝试过: < br $>
am trying to make a signup form but the problem is
that when i hit button it will take to my
signup source and the following in my browser
first=francis&last=chijioke&uid=alert&pwd=1234
What I have tried:
index.php
<!DOCTYPE html>
<meta charset = "UTF-8">
<title>my_school
<br>
<br>
<br>
<br>
SIGN UP
signup.php
<?php
include 'dbh.php';
$first = $_POST['first'];
$last = $_POST['last'];
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
echo $first."<br>";
echo $last."<br>";
echo $uid."<br>";
echo $pwd."<br>";
?>
dbh.php
<?php
$conn = mysqli_connect("localhost", "root", "", "logintest");
if(!$conn){
die("Connection failed".mysqli_connect_error());
}
?>
推荐答案
first =
_POST ['first'];
_POST['first'];
last =
这篇关于在PHP中注册注册按钮时如何消除此错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文