Skip to content

martinscoding/PHP-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

My First Steps in PHP — Calculator Project

A small introductory PHP project created to practice working with HTML forms, POST requests, and basic PHP logic by building a simple calculator.


Components & Structure

|- 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

Preview

(Example output of the script)

5 + 3 = 8

🇬🇧 English

About the Project

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.

Learning Aspect

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

Technologies

  • PHP
  • HTML
  • CSS

Author

Created by Martin


🇩🇪 Deutsch

Über das Projekt

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.

Lern Aspekt

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

Technologien

  • PHP
  • HTML
  • CSS

Autor

Erstellt von Martin

About

A simple PHP calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors