📚 | Exercise 3: Forms and Predefined Variables
This exercise aims to create a minimalist and non-secure system for user login and account creation.
A JSON file named users.json
will be used to store the users.
The HTML form inputs have intentionally been simplified to facilitate the testing process of your code (if I had added required
, you would have to fill in the fields each time).
Clone the project
If not already done, clone the project from https://github.com/PHP-BUT2-DACS/TP-TD
git clone https://github.com/PHP-BUT2-DACS/TP-TD.git
Do the exercises
- Start the PHP server in the
/Session 2/Exercise3
directory
php -S localhost:8080
-
Access the page http://localhost:8080/login.php
-
Complete the exercises in Exercise 3. Feel free to ask for help if needed.
tip
To progress better in the exercise, it is recommended to fill in the files in this order:
profile.php
logout.php
signup.php
login.php
tip
Don't forget to check your users.json
file after creating a user.