At first I just follow this youtube tutorial and after I can do it than I start making my own ^^
I've followed this youtube quite precisely, the difference is he used xampp and I used online host, but I tried to calling sql database and it works so I believe the sqli_connection is correct with all the localhost, username, password, and database name
but why when I want to try another one with inputting data there's no error but there's nothing happened on the db even though I refreshed it already? When I tried putting the same code into the sql it works perfectly fine!
Html code
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form action="signup.php" method="POST">
<input type="text" name"first" placeholder="Firstname"><br>
<input type="text" name"last" placeholder="Lastname"><br>
<input type="text" name"email" placeholder="E-mail"><br>
<input type="text" name"uid" placeholder="Username"><br>
<input type="password" name"pwd" placeholder="Password"><br>
<button type="submit" name="submit">Sign Up</button>
</form>
</body>
</html>
Signup PHP Code
<?php
include 'connection.php';
$first = $_POST['first'];
$last = $_POST['last'];
$email = $_POST['email'];
$uid = $_POST['uid'];
$pwd = $_POST['pwd'];
$sql = "INSERT INTO users (user_first, user_last, user_email, user_uid, user_pwd) VALUES ( '$first','$last','$email','$uid','$pwd');";
$result = mysqli_query($conn, $sql);
header("Location: /home.php?signup=success");