I made a site where I have implemented this file that belongs to the login but it does not work for me
<script type="text/javascript">
function loginsuccessufully(){
setTimeout("window.location='backoffice/view.php'", 3000);
}
function loginfalhou(){
setTimeout("window.location='../historia.php'", 3000);
}
</script>
<? php include('backoffice/db-config.php') ?>
<? php
$nome = $_POST['nome'];
$password = $_POST['password'];
$db = mysql_query("SELECT * FROM 'users' WHERE nome = '$nome' and password = '$password' ") or die(mysql_error());
$num_row = mysql_num_rows($row);
if($num_row < 1){
session_start();
$_Session['nome']=$_POST['nome'];
$_Session['password']=$_POST['password'];
echo"tas dentro";
echo" <script>loginsuccessufully()</script>";
} else{
echo"Login falhoe";
echo" <script> loginfalhou() </script>";
}
?>
Do not give me any errors just run the last echo