Haifa linux club:PHP lecture
Prev Next


MySQL example : guest book


we want to display a list of the other guests who signed.
We want to allow user to enter his name and comment.
This information will be stored in our MySQL DB and will
be added to the list.

1.
CREATE DATABASE gustbook
(or use existing db)

2.
Create the table containing the list.
SQL-query:
CREATE TABLE guestsign (id INT not null AUTO_INCREMENT, name TEXT not null , 
comment TEXT not null , PRIMARY KEY (id), INDEX (id), UNIQUE (id)) 



HOME