Home >Backend Development >PHP Tutorial >PHP Study Notes 3 Basic Database Operations_PHP Tutorial
The following is the process of logging in to mysql on Linux, creating a database and creating a table.
yin@yin-Ubuntu10:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 360
Server version: 5.1.41-3ubuntu12.1 (Ubuntu)
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> create database UseCase;
Query OK, 1 row affected (0.00 sec)
mysql> use UseCase; varchar(20) primary key,Password varchar(20) not null,CreateTime timestamp default current_timestamp);
Query OK, 0 rows affected (0.01 sec) Let’s create a page to create a new user page. First is a simple form:
Copy code
Password and Confirm Password must match.
User Created Successfully!';
}elseif($sucess==false ) {
echo '
User Name existed.';
}
}
?>
Next, we write a user list page .