Foto van een kale caricature die naar zichzelf wijst.

Elif Pekdemir

Lab 5 - Contact Form

Goals of exercise

Summarise the goals of the exercise in bullet points.

  1. Objective:
    Extend the personal portfolio with a contact form that securely stores messages in a MySQL database.
  2. Setup:
    Configured and used a local AMP-stack to run and test PHP code.
  3. Implementation:
    Adapted provided PHP demo code and integrated it with HTML/CSS to handle form submission and data storage.
  4. Functionality:
    Created a hidden mechanism to allow the portfolio owner to view all stored messages.
  5. Database Management:
    Created a database, imported the provided SQL dump to create the necessary table, and adjusted PHP connection settings.
Go to the solution

Description

Describe the exercise in a few sentences. What is important? What do you need to use?

→ This lab focused on integrating server-side functionality into the existing web portfolio by building a working contact form. The core task involved setting up a local AMP-stack environment to execute PHP code. We adapted provided PHP scripts to establish a database connection and ensure the form data was stored in a MySQL database upon submission. Finally, a separate "secret" page was implemented, using PHP and SQL, to fetch and display all submitted messages for the portfolio owner, including the extra form fields. Crucial steps included understanding the link between HTML form attributes and PHP data processing, and providing a suitable "Thank you" page and correct error messages

Related links

What were the websites that you used?

PHP & MySQL Connection

Handling Checkboxes in PHP

Local Server Setup

→ and mostly copy paste from my other projects.

Reflection

Woaw!

Describe what went well. Describe what you did good.

→ Page flow and environment setup.

Aauuw!

Describe what was difficult. Where did you spend most of the time?

→ Handling Checkboxes and sorting out how it works.

Not sure?

Describe what you are unsure about or what you're doubtful about.

→ The "Secret URL" Access. It annoyed the crap out of me.