I need some help with PHP. $_POST is not working in PHP. I'm using MAMP on Mac.
I have no errors returned, no data stored in my DB.
My DB username and password are not switched because I set the password as 'root'.
<?php
$conn = mysqli_connect('localhost', 'juicysoft', 'root', 'PublicFiles');
$uname = $_POST['uname'];
$pword = $_POST['pword'];
$email = $_POST['email'];
$sql = 'INSERT INTO users (uname, pword, email) VALUES ($uname, $pword,
$email)';
mysqli_query($conn, $sql);
if (mysqli_connect_errno()) {
echo mysqli_connect_error();
} else {
echo "Success!";
}
?>
<!-- The form that I need to post -->
<!DOCTYPE html>
<html>
<head>
<title>PublicFiles - Register</title>
</head>
<body>
<h1>Register</h1>
<form action="process.php" method="post">
<input type="text" name="uname" placeholder="Screen Name..."><br>
<input type="password" name="pword" placeholder="Password..."><br>
<input type="email" name="email" placeholder="Email..."><br>
<input type="submit" value="Sign Up">
</form>
</body>
</html>