This is a simple PHP project demonstrating the use of POST, SESSION, and GET.
Users can register with their name, age, and email, store the data in a session, and view the information on a profile page.
-
Registration Form (POST)
- User fills out a form with Name, Age, and Email.
- Data is sent via POST to
register_process.php
.
-
Session Storage
- Submitted data is stored in a SESSION variable, allowing temporary storage across pages.
-
Profile Page (GET)
- After registration, the user is redirected to
profile.php?view=details
. - The profile page reads the SESSION data and displays the user’s details.
- After registration, the user is redirected to
register.php
– Registration form page (POST form).register_process.php
– Processes form data and stores it in SESSION.profile.php
– Displays the registered user’s information using GET and SESSION.
After submitting the form, the profile page shows:
- Name
- Age
(additional)
- Date when it registerer (DAY, MONTH, YEAR)
- POST – Secure form submission.
- SESSION – Temporary storage of user data across pages.
- GET – Navigation to profile page using query parameter (
profile.php?view=details
). - Bootstrap 5 – Modern responsive design.
- Place the project folder in your local server (e.g.,
htdocs
in XAMPP). - Open
register.php
in your browser (e.g.,http://localhost/PHP_LabTask4.3/register.php
). - Fill out the form and submit.
- You will be redirected to
profile.php?view=details
, displaying your submitted information.
- No database is used; all data is stored in PHP sessions.
- Data is temporary and will be cleared when the session ends or the browser is closed.
- Ideal for demonstrating basic PHP form handling and session management.