Web 4: basic php login page with semantic html5
Goal
This exercise is a leap forward and requires that the student learn basic php from whatever source works best for them.
The student uses basic php to process form data. The page must validate correctly with the W3’s html validator - https://validator.w3.org also, for any custom css - http://jigsaw.w3.org/css-validator/.
Structure:
-
the login page, index.php, contains a form that calls itself when the user submits the form
-
the authentication logic checks:
-
that the username and/or password fields have been filled
-
reports with an error message if not:
-
the error message is placed within the html above form tags
-
color the text or the background of the error message div as light red so the user knows that something went wrong
-
-
checks for the correct user and password
-
reports with an error message if not
-
if correct, redirects to the welcome page from the basic html website
-
Tutorials
I am not sure how useful LinkedIn learning is for this.
-
Traversy has the 'PHP Front To Back,' https://www.youtube.com/playlist?list=PLillGF-Rfqbap2IB6ZS4BBBcYPagAjpjn, series
-
video 15 builds a php contact form that can provide some hints for this exercise
-
-
https://www.phptutorial.net/ looks comprehensive for beginners.
General References
-
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
-
https://www.w3schools.com/php/
-
https://phpdelusions.net/ has great php best practices and tips
-
-
https://php.net/ is php’s definitive reference
-
'Mozilla Developer Network,' https://developer.mozilla.org/en-US/.