Can someone please tell me what I need to do to make this message go away…
“Deprecated: Function session_register() is deprecated in C:\xampp\htdocs\html-5\administrator\admin_check.php on line 20”
Here is the script below I don’t how to make this go away.
[php]<?php
$error_msg = “”;
if (isset ($_POST[‘username’])) {
$username = isset($_POST['username']) ? $_POST['username'] : '';
$password = isset($_POST['password']) ? $_POST['password'] : '';
// Simple hard coded values for the correct username and password
$admin = "mark";
$adminpass = "tiko";
// connect to mysql here if you store admin username and password in your database
// This would be the prefered method of storing the values instead of hard coding them here into the script
if (($username != $admin) || ($password != $adminpass)) {
$error_msg = ': <font color="#FF0000">Your login information is incorrect</font>';
} else {
session_register('admin');
$_SESSION['admin'] = $username;
require_once "index.php";
exit();
}
}// close if post username
?>
Only the administrator can view this directory
Please Log In Here' . $error_msg . ' | |
Username: | |
Password: | |
Or click here to head back to the homepage'; exit(); } ?>
[/php]
Your help is kindly appreciated
thanks