Skip to content

Latest commit

 

History

29 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

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.

  • 新建s 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. 探索 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.

关于

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.

Topics

Resources

Stars

1 star

关注者

1 watching

复刻s

发布

Used by

贡献者

Languages