Skip to content

Latest commit

 

History

History
91 lines (61 loc) · 2.4 KB

File metadata and controls

91 lines (61 loc) · 2.4 KB

FirstPHP

FirstPHP is a collection of PHP scripts and examples created for learning and practicing PHP programming. This repository contains various examples of basic PHP concepts, forms, file handling, cookies, sessions, and simple database interactions. It was originally developed as part of university coursework to demonstrate practical usage of PHP.


Features

  • Basic PHP Scripts
    Simple operations like addition, multiplication, division, and variable manipulations.

  • Forms Handling
    Examples of handling HTML forms with GET and POST methods, including validation and arithmetic operations.

  • File Operations
    Reading and writing files, storing user input, and managing text files.

  • Cookies and Sessions
    Demonstrates creating, reading, and deleting cookies and managing PHP sessions.

  • Database Examples
    Basic CRUD operations with a simple database setup (first-db folder), including student management forms.

  • News Portal Example
    A mini news website example demonstrating dynamic content loading, categories, search, and media handling.


Folder Structure

.
├── add-two-numbers.php
├── div-two-numbers.php
├── cookie/         # Cookie examples
├── file/           # File handling examples
├── form/           # Form handling examples
├── first-db/       # Database examples (CRUD)
├── news/           # Mini news website
├── session/        # Session examples
├── LICENSE
├── README.md
└── ...other PHP scripts

Usage

  1. Clone the repository:
git clone https://github.com/BaseMax/FirstPHP.git
cd FirstPHP
  1. Run the PHP scripts using a local server (e.g., XAMPP, WAMP, or PHP built-in server):
php -S localhost:8000
  1. Open your browser and navigate to the script you want to test:
http://localhost:8000/add-two-numbers.php
http://localhost:8000/form/1.php
http://localhost:8000/cookie/index.php
  1. Explore different examples in their respective folders to learn PHP basics.

Contact

You can contact the author via:


License

This project is licensed under the MIT License.

Copyright 2025 Seyyed Ali Mohammadiyeh (Max Base)

See the LICENSE file for more information.