is it safe to use this code publicly?
<?php
session_start();
if($_POST['name'] == "user" && $_POST['password'] == "password")
{
$_SESSION['auth'] = 412;
$_SESSION["password"] = $_POST['password'];
header('Location: login.php');
exit();
}
?>
In login.php
<?php
session_start();
if(!isset($_SESSION['auth']) || $_SESSION['auth'] != 412 || !isset($_SESSION["password"]) || empty($_SESSION["password"]))
{
header('Location: index.php');
exit();
}
?>
I just need some verification to enter login.php...