I have a simple login form using PDO prepared statements which worked fine under php 7.3 but under 7.4 i find this has an issue
the code im using simply is:
if(isset($_POST['btn_login'])){
$useremail = $_POST['txt_email'];
$password = $_POST['txt_password'];
$select= $pdo->prepare("select * from tbl_user where useremail='$useremail' AND password='$password'");
$select->execute();
$row=$select->fetch(PDO::FETCH_ASSOC);
if($row['useremail']==$useremail AND $row['password']==$password){
echo $success='Login Successful';
header('refresh:1;dashboard.php');
}else{
echo 'Login Failed';
}
using PDO and prepared statements whats the correct solution for php 7.4?