we need in this cour to create a database of user , its sample and easy :
we define for the user :
1- id
2- username
3- password
the database is a collection of tables .
we need in our database , one table
ok . this good
Applied works :
You have you installed Appserv from (here)
insert in the adress of your browser : localhost/phpmyadmin
enter the username and password ; (root , root) , and this pursuant to configuration in the time of install appserv
1-enter the name of your database (logine) and click at (creat)
the database may be Contains table or more .
2- create a table in this database , the name is (users) and contains 3 Fields
the fields are :
the id : of type INT (20) and (auto increment) and it is the key
the usernmae : of type VARCHAR (20)
the password : of type VARCHAR (20)
ok ,
We arrived at the end of the lesson today, hoping to meet you in the next lesson
the next cour : how to use this database by our scripte
we define for the user :
1- id
2- username
3- password
the database is a collection of tables .
we need in our database , one table
ok . this good
Applied works :
You have you installed Appserv from (here)
insert in the adress of your browser : localhost/phpmyadmin
enter the username and password ; (root , root) , and this pursuant to configuration in the time of install appserv
the database may be Contains table or more .
2- create a table in this database , the name is (users) and contains 3 Fields
the fields are :
the id : of type INT (20) and (auto increment) and it is the key
the usernmae : of type VARCHAR (20)
the password : of type VARCHAR (20)
in our cour we set a new user
id = 1
username= jojo
password = 112233
i export my table befor you . in format SQL , you need this table
If you just do not understand
If you just do not understand
-- phpMyAdmin SQL Dump
-- version 2.10.3
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Mar 08 Juillet 2014 à 20:40
-- Version du serveur: 5.0.51
-- Version de PHP: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Base de données: `logine`
--
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE TABLE `users` (
`id` int(20) NOT NULL auto_increment,
`username` varchar(20) NOT NULL,
`password` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Contenu de la table `users`
--
INSERT INTO `users` VALUES (1, 'jojo', '112233');
-- version 2.10.3
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Mar 08 Juillet 2014 à 20:40
-- Version du serveur: 5.0.51
-- Version de PHP: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Base de données: `logine`
--
-- --------------------------------------------------------
--
-- Structure de la table `users`
--
CREATE TABLE `users` (
`id` int(20) NOT NULL auto_increment,
`username` varchar(20) NOT NULL,
`password` varchar(20) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Contenu de la table `users`
--
INSERT INTO `users` VALUES (1, 'jojo', '112233');
ok ,
We arrived at the end of the lesson today, hoping to meet you in the next lesson
the next cour : how to use this database by our scripte
No comments:
Post a Comment