This is a simple web application written in vanilla PHP that allows users to create, view, and delete posts. It uses a MySQL databse to store posts.
- Create Post: Users can create a new post by filling out a form with a title and content.
- View Post: Users can view a list of all posts and click on a post to view its details.
- Delete Post: Users can delete a post.
- PHP 7.0 or higher
- Web server (e.g., Apache, Nginx)
- MySQL database (optional, for future enhancements)
-
Create Database Schema:
- Run the
postsdb.sql
file to create thepostsdb
database and theposts
table. You can do this using a MySQL client such as phpMyAdmin or the MySQL command line interface.
mysql -u your_username -p postsdb < postsdb.sql
- Run the
-
Configure Database Connection:
- Update the database connection settings in your PHP application to connect to the
postsdb
database (changeyour_username
andyour_password
).
- Update the database connection settings in your PHP application to connect to the
-
Clone the repository:
git clone https://github.com/MrMDrX/Posting-App-PHP.git
-
Navigate to the project directory:
cd Posting-App-PHP
-
Start the PHP built-in server:
php -S localhost:8000
-
Open your web browser and visit
http://localhost:8000
to view the app.
- Create Post: Click on the "Create Post" link in the navigation menu and fill out the form.
- View Post: Click on the "View Posts" link in the navigation menu to see a list of all posts. Click on a post to view its details.
- Delete Post: Click on the "Delete" button next to a post to delete it.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.