I am trying to authenticate a user in a MYsql database. I have tried so many tutorials to just fail every time. I am pasting my code below, I dont care about security or sql injection right now. I am just trying to get this to work so I can go on to my next requirement. If anybody has any links to a GOOD php/html5 login authentication tutorial then please share. I easily was able to create a registration form but this login form is really giving me difficulties.
$id =$_POST['Id'];
$password =$_POST['password'];
$accessdb = "SELECT * from UserData where Id ='$id' and password ='$password";
$authenticate = mysqli_query($conn, $accessdb);
if (mysqli_num_rows($authenticate) == 1) {
session_start();
$_SESSION['auth'] = 'true';
header('location: Profile.php');
}
else {
echo "Wrong log-in credentials";
}