hello my dear Friends,
for a long time i was not here. I hope u all are geting well. again i have problem in login form anyone can guide me plz, code is below
<?php
include "conn.php";
if($_SERVER["REQUEST_METHOD"] == "POST"){
$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);
$password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_SPECIAL_CHARS);
$sql = "SELECT * FROM admintb WHERE username = '$username' and passcode = '$password'";
$result = $conn->query($sql);
if( $result->num_rows > 0)
{
echo "welcome!! You are loged in ";
}else {
$error = "Your Login Name or Password is invalid";
}
}
?>
Pleaez hepl me as soon as posible.