i am trying to learn how to create a signup
,and am watching a video to do that,but the problem is i followed their steps but my database connection is not working,i tested it to echo the first,last,username and password when signup button is hit,but the case is that it returns me to my signup.php source code,please i did help to resolve the issue,am new to php and mysql.
this my index.php code
<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8">
<title>my_school</title>
<link href="myschool.css" type="text/css" rel="stylesheet">
</head>
<body>
<form action = "signup.php">
<input type="TEXT" name="first" placeholder="firstname"><br>
<input type="TEXT" name="last" placeholder="lastname"><br>
<input type="TEXT" name="user" placeholder="username"><br>
<input type="password" name="pass" placeholder="password"><br>
<button type="submit">SIGN UP</button>
</form>
</body>
</html>
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());
}
?>