Posts

Php session

Php session Introduce how to use session for checking login. Session 1: code (database file, login.php, checklogin.php, sessionCSS.css, conn.php, index.php) Session 2: concept thread Session 3: explanation Database ------------------------------------------------------------------------------------------------------- create database `sessionShop`; CREATE TABLE admin (     name varchar(64) NOT NULL default '',     password varchar(64) NOT NULL default '',     primary key(name) ); ------------------------------------------------------------------------------------------------------- login.php ------------------------------------------------------------------------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8...
Image
Although PHP is not fresh today, it is still there. And php paging is still useful. Let's have a look. There are three portions of this article. To begin with, the result code will be given. To the next part, it is the basic threads of how to do it. The last step is explaining my code. First thing first, to do paging, create database is basic. And then, the connection file conn.php, paging file paging1.php and css file pagingCSS.css . Named them anything you like, in this case, they named as listed. Create Database code: ------------------------------------------------------------------------------------------------------- create database `pagingDB`; create table tablePages (     id bigint(30) unsigned NOT NULL AUTO_INCREMENT,     name varchar(64) NOT NULL default '' UNIQUE,     phone varchar(3) NOT NULL default '',     primary key (id) ) INSERT INTO `tablePages`(`id`, `name`, `phone`) VALU...