{"id":22051307,"url":"https://github.com/badalk121/school_demo","last_synced_at":"2026-05-05T12:34:09.184Z","repository":{"id":265059275,"uuid":"895007692","full_name":"badalk121/school_demo","owner":"badalk121","description":"A PHP and MySQL based application to manage students and classes with CRUD functionalities.","archived":false,"fork":false,"pushed_at":"2024-11-27T12:18:19.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T15:32:46.624Z","etag":null,"topics":["bootstrap","crud-application","mysql","php","webdevelopment"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badalk121.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-27T11:51:38.000Z","updated_at":"2024-11-27T12:20:03.000Z","dependencies_parsed_at":"2024-11-27T14:49:33.756Z","dependency_job_id":null,"html_url":"https://github.com/badalk121/school_demo","commit_stats":null,"previous_names":["badalk121/school_demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/badalk121/school_demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badalk121%2Fschool_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badalk121%2Fschool_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badalk121%2Fschool_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badalk121%2Fschool_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badalk121","download_url":"https://codeload.github.com/badalk121/school_demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badalk121%2Fschool_demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32649600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","crud-application","mysql","php","webdevelopment"],"created_at":"2024-11-30T15:08:33.604Z","updated_at":"2026-05-05T12:34:09.152Z","avatar_url":"https://github.com/badalk121.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# School Demo Project\r\nThe School Demo Project is a PHP and MySQL-based web application for managing students and classes. It features CRUD operations for students, including image uploads, and class management. The project is styled with Bootstrap for a modern, responsive design. Students' details, including class names, are dynamically displayed using SQL JOIN queries. The application includes secure file handling, form validation, and an intuitive user interface. Designed for educational purposes, it demonstrates core concepts of web development, database integration, and server-side programming.\r\n\r\n\r\n## Features\r\n1. **Home Page**: List all students with their details and options to view, edit, or delete them.\r\n2. **Create Student**: Add a new student with an image upload.\r\n3. **View Student**: View a student's full details.\r\n4. **Edit Student**: Update a student's information and optionally upload a new image.\r\n5. **Delete Student**: Remove a student and their image from the server.\r\n6. **Manage Classes**: Add and list all available classes.\r\n\r\n## Prerequisites\r\n1. Install [XAMPP](https://www.apachefriends.org/index.html) on your Windows 10 system.\r\n2. Install a code editor like [Visual Studio Code (VS Code)](https://code.visualstudio.com/).\r\n3. Basic understanding of PHP and MySQL.\r\n\r\n## Steps to run the project locally\r\n\r\n### 1. Set up the environment\r\n- Start the **Apache** and **MySQL** services from the XAMPP Control Panel.\r\n\r\n### 2. Create the database\r\n1. Open `http://localhost/phpmyadmin` in your browser.\r\n2. Create a new database named `school_db`.\r\n3. Execute the following SQL script to create the required tables:\r\n    ```sql\r\n    CREATE TABLE student (\r\n        id INT AUTO_INCREMENT PRIMARY KEY,\r\n        name VARCHAR(255) NOT NULL,\r\n        email VARCHAR(255),\r\n        address TEXT,\r\n        class_id INT,\r\n        image VARCHAR(255),\r\n        created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\r\n    );\r\n\r\n    CREATE TABLE classes (\r\n        class_id INT AUTO_INCREMENT PRIMARY KEY,\r\n        name VARCHAR(255) NOT NULL,\r\n        created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\r\n    );\r\n    ```\r\n\r\n### 3. Set up the project files\r\n1. Clone or download this repository.\r\n2. Place the folder `school_demo` inside the `htdocs` directory of your XAMPP installation (`C:\\xampp\\htdocs\\school_demo`).\r\n3. Ensure the folder structure is as follows:\r\n    ```\r\n    school_demo/\r\n    ├── db.php\r\n    ├── index.php\r\n    ├── create.php\r\n    ├── view.php\r\n    ├── edit.php\r\n    ├── delete.php\r\n    ├── classes.php\r\n    ├── uploads/ (make this directory writable)\r\n    ```\r\n\r\n### 4. Configure the database connection\r\n1. Open the `db.php` file.\r\n2. Update the following details if they differ in your setup:\r\n    ```php\r\n    $host = \"localhost\";\r\n    $username = \"root\";\r\n    $password = \"\";\r\n    $dbname = \"school_db\";\r\n    ```\r\n\r\n### 5. Run the project\r\n1. Open your browser and navigate to: `http://localhost/school_demo/`\r\n2. Use the application to manage students and classes.\r\n\r\n## Project files\r\n- **db.php**: Database connection file.\r\n- **index.php**: Home page listing all students.\r\n- **create.php**: Form to create a new student.\r\n- **view.php**: View details of a single student.\r\n- **edit.php**: Form to edit a student's information.\r\n- **delete.php**: Deletes a student and their image.\r\n- **classes.php**: Manage class names.\r\n\r\n## Notes\r\n1. **Uploads directory**:\r\n   - Ensure the `uploads/` directory exists and has write permissions.\r\n   - All uploaded images will be stored here.\r\n\r\n2. **Image Validation**:\r\n   - Only `jpg` and `png` file formats are allowed.\r\n\r\n3. **Styling**:\r\n   - The project uses **Bootstrap** for responsiveness and visual appeal.\r\n\r\n## Troubleshooting\r\n- **Error: Database connection failed**:\r\n  - Verify your `db.php` credentials.\r\n  - Ensure the `school_db` database exists in phpMyAdmin.\r\n- **Images not uploading**:\r\n  - Check if the `uploads/` folder has write permissions.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadalk121%2Fschool_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadalk121%2Fschool_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadalk121%2Fschool_demo/lists"}