How to add a login sysmte without MySQL to your site

writehow June 24, 2012 0

This tutorial will show you how to add a login system without MySQL to your site.

A. Requirements:
You need basic knowledge of HTML and PHP.
The site must support HTML and PHP.

2. Files to create:
Create the following files:

top.php
btm.php
index.php
login.php
register.php
adduser.php
home.php
users.php

3. How will it work without MySQL?
The database we will be MySQL, but will be a simple PHP file (users.php), which will record all users and their passwords. If someone opens the file, he can read only user names, they will encrypt (blinding) passwords.

4. Contents of files:
4.1. top.php:
<! – Start ->
<! – File top.php ->
<! – Wrote: (C) 2012 Cyril Goal
The code is not copied anywhere without mentioning my name. ->
<html>
<head>
<title> <? echo $ title;?> </ title>
</ Head>
<body alink=”blue” link=”blue” vlink=”blue”>
<! – End ->

4.2. btm.php:

<! – Start ->

<! – File btm.php ->

<! – Wrote: (C) 2012 Writehow.NET

The code is not copied anywhere without mentioning WriteHow.NET ->

</ Body>

</ Html>

<! – End ->

4.3. index.php:

<! – Start ->

<! – File index.php ->

<! – Wrote: (C) 2012 WriteHow.NET

The code is not copied anywhere without mentioning my name. ->

<? Php

$ Title = “Log in”;

include (“top.php”);

?>

<center>

<h2> <i> <b> Please log in: </ i> </ h2>

<br> <h3> <br> <br>

<form action=”login.php” method=”post”>

Identification number (id): <br>

<input type=”text” name=”id” size=”15″ /> <br>

Username:

<input type=”text” name=”user” size=”15″ /> <br>

Password:

<input tyoe=”password” name=”pass” size=”15″ /> <br>

<Input type = “submit” value = “Go!” name = “submit” /> <br>

</ Form>

<br>

If you are not registered yet, click <a href=”register.php”> HERE </ a>, to register.

</ H3> </ b> </ center>

<? Php

include (“btm.php”);

?>

<! – End ->

Leave A Response »