I'm creating a sign-up form and following this video.
Registration doesn't work. User data doesn't transfer and appear in phpmyadmin user table. Can you help me please?
<?php
include 'dbh.php';
$first = $_post['first'];
$uid = $_post['uid'];
$pwd = $_post['pwd'];
$sql = "INSERT INTO user (first, uid, pwd)
VALUES ('$first', '$uid', '$pwd')";
$result = mysqli_query($conn, $sql);
header("Location: contact.html");
and for dbd.php
$conn = mysqli_connect("");
if (!$conn) {
die("connection failed: ".mysqli_connect_error());
}
Connection seems to be working because it doesnt write error, which used to when i had wrong input there.