Hello, Dev Community! ๐
Today, I want to share with you my journey of creating a File Management System using PHP and MySQL. This project is a great way to learn about file uploads, database interactions, and overall web application development. Letโs dive in! ๐
๐ Project Overview
The File Management System allows users to:
- Upload files ๐ค
- View uploaded files ๐
- Update file details โ๏ธ
- Delete files ๐๏ธ
It's a straightforward web application that can be used for various purposes, such as managing documents, images, or any other file types.
๐ ๏ธ Tech Stack
- PHP: For server-side scripting
- MySQL: To manage the database
- Bootstrap: For responsive UI design
- Font Awesome: For icons
- HTML/CSS: For structuring and styling the web pages
๐ป Features
- File Uploads: Users can easily upload files through a user-friendly interface.
- File Management: View, update, and delete files as needed.
- Privacy & Terms: Includes dedicated pages for privacy policy and terms of service to keep users informed.
๐ฆ File Structure
Here's a quick look at the file structure of the project:
file-management-system/
โโโ delete.php # Script to delete files
โโโ index.php # Home page
โโโ privacy_policy.php # Privacy policy page
โโโ terms_of_service.php # Terms of service page
โโโ update.php # Update file details
โโโ upload.php # Handle file uploads
โโโ uploads.sql # SQL file for database setup
โโโ upload_form.php # File upload form
โโโ view_files.php # View uploaded files
โโโ _Footer.php # Footer component
โโโ _Nav.php # Navigation component
โโโ conn.php # Database connection file
๐ How It Works
-
Uploading Files:
- Users can select files from their local system and upload them.
- The files are stored in a designated folder, and their paths are saved in the database.
-
Viewing Files:
- Users can see a list of uploaded files with options to download or delete them.
-
Updating Files:
- Users can edit file details, like changing the file name.
๐ก Getting Started
If youโre interested in trying it out, hereโs how to set it up locally:
- Clone the repository:
git clone https://github.com/Anticoder03/file-management.git
- Navigate to the project folder:
cd file-management-system
- Import the SQL file to your MySQL database.
-- import uploads.sql
-
Configure the database connection in
conn.php
.
<?php
// Database configuration
$servername = "localhost";//hostname
$username = "root"; //username
$password = ""; //password
$dbname = "file_management"; //databasename
// Create a new MySQLi connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check the connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
} else {
// echo "Connected successfully!";
}
?>
- Run the application in your web browser:
http://localhost/file-management/index.php
๐ Conclusion
Creating this File Management System was a rewarding experience that allowed me to solidify my understanding of PHP and MySQL. I encourage you to try building your own projects and share your experiences with the community!
Feel free to check out the project on GitHub and let me know your thoughts! ๐ฌ
๐ค Whatโs Next?
I plan to enhance this project by adding user authentication and more advanced file management features. Stay tuned for updates! ๐
Thank you for reading! If you found this post helpful, give it a ๐ and share your thoughts in the comments below! Happy coding! ๐จโ๐ป๐ฉโ๐ป
Top comments (0)