11.1. Adding an admin Table to the Database

Enabling administrators for your site requires that you create a table to store their information. This simple table, admin, stores the following information:

  • username: The administrator's login name

  • password: The administrator's password

Your username needs to be unique, so make it the table's primary key. Specify both fields as of the VARCHAR type, limit the username to 75 characters, and limit the password to 40 characters.

To create the admin table, navigate to http://localhost/phpmyadmin in a browser and open the SQL tab. Enter the following command to create your table:

CREATE TABLE simple_blog.admin
(
username VARCHAR(75) PRIMARY KEY,
password VARCHAR(40)
)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.74.66