Upload
seamus-dagley
View
216
Download
0
Embed Size (px)
Citation preview
Design• Database student– Table auth_user– Re-use m12 scripts to create the table
• MVC– GUI: xhtml for registration entry– PHP: process the input and insert the entry into DB
table auth_user– DB: auth_user– GUI: xhtml for existing user login– PHP: process the username-password, query
auth_user
Add table ‘auth_user’ to DB ‘student’
The above message was generated by the PHP sript.Is it really true?Use m11 script to list tables
mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || books || cs346 || ex04a || mailinglist || mysql || products || student || testdb1 |+--------------------+9 rows in set (0.00 sec)
mysql> use student;Database changedmysql> show tables;+-------------------+| Tables_in_student |+-------------------+| auth_user || my_music |+-------------------+2 rows in set (0.00 sec)
mysql> use student;Database changedmysql> show tables;+-------------------+| Tables_in_student |+-------------------+| auth_user || my_music |+-------------------+2 rows in set (0.00 sec)
mysql> SELECT * FROM auth_user;Empty set (0.00 sec)
mysql> SELECT * FROM auth_user;+--------+--------+----------+-------------------------------------------+| f_name | l_name | username | password |+--------+--------+----------+-------------------------------------------+| John | Doe | john.doe | *54B88827AF6DA4FCE049F501D462BE6A9F7EF979 |+--------+--------+----------+-------------------------------------------+1 row in set (0.00 sec)
mysql>
Next
• Upload to remote server• Testing– Repeat all the steps in the local server:• Create table auth_user• Enter new registrations• Authenticate the users