Hey,
I have registration and login forms on the website I am developing, but I would just like some help with the security side of things.
Basically I have an admin control panel which I want to make as secure as possible and I'm wondering how I can go about that.
At the moment, when the user logs in a session is set and they are re-directed to the admin panel using the following code:
$_SESSION['email'] = $_POST['email'];
$id = session_id();
$url = "Location: admin-panel.php?sid=" . $id;
header($url);
Then, on the admin control panel, the following code is used to see if the session is set:
<?php
session_start ();
if (!isset($_SESSION['email']))
{
session_unset ();
session_destroy ();
$url = "Location: login.php";
header ( $url );
}
else //otherwise, they can see the page
{
?>
This works but it just doesn't feel enough. I want to make the admin panel literally as secure as possible, so is there any suggestions you can give me to help me make it more secure?
Thanks very much,
Kieron