TAAFT
Free mode
100% free
Freemium
Free Trial
Deals

BaseMax / FirstPHP

FirstPHP is a collection of PHP scripts and examples designed for learning and experimenting with PHP basics, forms, sessions, cookies, file handling, and simple database interactions. This repository is ideal for beginners and students who want to understand PHP programming through practical examples.

1 0 Language: PHP License: GPL-3.0 Updated: 3mo ago

README

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.

0 AIs selected
Clear selection
#
Name
Task