A small introductory PHP project created to practice working with HTML forms, POST requests, and basic PHP logic by building a simple calculator.
|- index.php
|- calc.php
|- style.css
- index.php – The main page containing the calculator form
- calc.php – Processes the calculation and displays the result
- style.css – External stylesheet for basic layout and colors
(Example output of the script)
5 + 3 = 8
This project represents my first steps in PHP, focusing on handling user input through HTML forms and processing it with PHP.
I created a simple calculator that supports addition, subtraction, multiplication, and division.
The main goal of this project is to become familiar with:
- Basic PHP syntax
- Handling form data with
GET - Using conditional logic (
switch) - Basic error handling (e.g. division by zero)
- Separating HTML, PHP, and CSS
- PHP
- HTML
- CSS
Created by Martin
Dieses Projekt umfasst meine ersten Schritte mit PHP, insbesondere die Verarbeitung von Benutzereingaben über HTML-Formulare und PHP.
Ich habe einen einfachen Taschenrechner erstellt, der Addition, Subtraktion, Multiplikation und Division unterstützt.
Das Ziel des Projekts war es, folgende Grundlagen zu erlernen:
- Grundsyntax von PHP
- Verarbeitung von Formulardaten mit
GET - Verwendung von bedingter Logik (
switch) - Einfache Fehlerbehandlung (z. B. Division durch 0)
- Trennung von HTML, PHP und CSS
- PHP
- HTML
- CSS
Erstellt von Martin