Web 7: connect php site to a mysql database for login check

Goal

Instead of using an array to hold valid users and their passwords, a mysql innodb table - called users, is queried. Its structure is:

  • username:

    • is the primary key

  • fullname

  • password

See the sql template file for the innodb table skeleton.

The student determines what data type the fields should be when creating the table.

Finally, the student uses sql through the pdo library to authenticate the user logging into the basic php site.

If necessary, the student and I can meet, for me to demonstrate the basics of data table design (database normalization).

Contact Mike Hurst to setup a student database account for yourself. I need to test the final result.

Tutorials

I am not sure how useful LinkedIn learning is for this.

Basic:

Intermediate:

General References

  1. Tania Rascia has a gem of a site with easy to understand introductory to intermediate tutorials - https://www.taniarascia.com/blog/ - on css, mysql, php, and jquery

  2. https://www.w3schools.com/

  3. https://php.net/ is php’s definitive reference

  4. 'Mozilla Developer Network,' https://developer.mozilla.org/en-US/.