Simple PHP Form with Database Integration This project demonstrates a simple PHP form with database integration. It allows users to submit their details and upload a health report (PDF file), which are then stored in a MySQL database.
Features Collects user information such as name, age, weight, and email. Allows users to upload a health report (PDF file). Inserts user details and health report into the database. Displays success messages or error messages based on form submission. Simple PHP Form with Database Integration This project demonstrates a simple PHP form with database integration. It allows users to submit their details and upload a health report (PDF file), which are then stored in a MySQL database.
Features Collects user information such as name, age, weight, and email. Allows users to upload a health report (PDF file). Inserts user details and health report into the database. Displays success messages or error messages based on form submission.
Technologies Used PHP: Server-side scripting language for handling form submission and database operations. MySQL: Relational database management system for storing user information and health reports. HTML/CSS: Front-end technologies for building the form and styling.
Setup Ensure you have a web server (e.g., Apache) with PHP and MySQL installed. Clone this repository or download the source code to your local machine. Create a MySQL database to store the user information and health reports. Update the database configuration in index.php with your MySQL credentials and database name. Create the necessary tables in the database by running the provided SQL queries in index.php. Set appropriate file permissions for the uploads directory to allow file uploads. Start the web server and navigate to the project folder in your web browser.
Usage Open the web page in your browser. Fill in the form fields with the required information. Choose a PDF file for the health report upload. Click the "Submit" button. If the form is submitted successfully, you will see a success message. If there are any errors, such as invalid file type or database connection issues, you will see an error message.
File Structure index.php: Contains the HTML form, PHP code for form submission, and database integration. style.css: CSS file for styling the form and page layout.
Result
License This project is licensed under the Deepika-jangra License.
Feel free to modify and adapt the code for your needs. Happy coding!