
Login is a very important part of any website, from securing contents from prying eyes to tracking visitors on your website. This tutorial is a simple login form for a website.Firstly you create "login.php" like this
Code:
<?php
session_start();// This starts the session which is like a cookie,but it isn't saved on your hdd and is much more secure.mysql_connect("localhost","DATABASE USER HERE","PASSWORD");// Connect to the MySQL servermysql_select_db("login"); // Select your Databaseif(isset($_SESSION['loggedin']))
{
die("You are already logged in!"); //...