Presentation is loading. Please wait.

Presentation is loading. Please wait.

User Authentication with DB Cs346 Fall 2010. Requirements Web site is for registered users only – Username and password – Password is encripted.

Similar presentations


Presentation on theme: "User Authentication with DB Cs346 Fall 2010. Requirements Web site is for registered users only – Username and password – Password is encripted."— Presentation transcript:

1 User Authentication with DB Cs346 Fall 2010

2 Requirements Web site is for registered users only – Username and password – Password is encripted

3 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

4 Development stages

5

6 Specify name of table and # columns

7 Define field for auth_user

8 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

9 Verify that table ‘auth_user’ is created etc. Information_schema has too many attributes

10 New User Registration

11 One entry added

12 Is the entry really there in DB? Use MySQL Console Write a PHP script to query the database

13 mysql> show databases; | Database | | information_schema | | books | | cs346 | | ex04a | | mailinglist | | mysql | | products | | student | | testdb1 | rows in set (0.00 sec) mysql> use student; Database changed mysql> show tables; | Tables_in_student | | auth_user | | my_music | rows in set (0.00 sec)

14 mysql> use student; Database changed mysql> show tables; | Tables_in_student | | auth_user | | my_music | 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 | row in set (0.00 sec) mysql>

15 Existing User Login

16 Existing User Login - successful

17 Existing User Login - Failure

18

19 Next Upload to remote server Testing – Repeat all the steps in the local server: Create table auth_user Enter new registrations Authenticate the users

20 Add a 2 nd New Registration

21 ok

22

23 success


Download ppt "User Authentication with DB Cs346 Fall 2010. Requirements Web site is for registered users only – Username and password – Password is encripted."

Similar presentations


Ads by Google