Drug Recommendation System Using Machine Learning, PHP, and MySQL Database
Welcome to this intelligent student project designed to assist users with smart healthcare solutions. Developed using PHP and powered by the PHP-ML library, this web application utilizes the Naive Bayes algorithm to suggest and recommend appropriate medications based on user-inputted symptoms.
By leveraging machine learning directly in a web environment, the system provides an efficient way to analyze health data and map specific symptoms to potential drug recommendations.
π Key Features
- Add Symptoms: Easily input and manage a variety of health symptoms into the database for classification.
- Add Drugs: Register new medications along with their corresponding medical usages and symptom profiles.
- AI Drug Recommendation Engine: Powered by a Naive Bayes Machine Learning model that processes input symptoms and predicts the most relevant drug.
- User Sign Up & Sign In: Secure authentication portal allowing users to create accounts and log in safely.
- Account Management: Personalized user profiles where account settings and user preferences can be updated.
π€ How It Works: Machine Learning Integration
1. What is PHP-ML?
PHP-ML (PHP Machine Learning) is an open-source library that brings machine learning algorithms to the PHP ecosystem. It allows web applications to perform tasks like classification, regression, clustering, and data preprocessing natively in PHP without relying on external Python or R microservices.
2. The Naive Bayes Algorithm
The core classification model relies on the Naive Bayes algorithm, a probabilistic machine learning model based on Bayes' Theorem. It calculates the probability of each potential medication given a specific set of symptoms. The system evaluates the input symptoms, compares them against learned patterns in the training data, and selects the medication with the highest probability score.
System Snapshots
Landing Page

Patient Registration

Login Page

Admin Dashbaord

Recommendation Form

Recommendation Result

Recommendation Records

π‘ System Summary
This web application demonstrates how machine learning can be combined with standard web technologies to process medical symptoms and intelligently recommend suitable medications to users in real time.
πΌ Available for Hire & Collaboration
Looking for a custom web or mobile solution? I am a developer specializing in building reliable, scalable, and modern digital applications. My areas of expertise include:
- Web Design: Crafting responsive, modern, and user-friendly web layouts.
- Web Development: Building robust dynamic web applications, backend APIs, and custom software integrations.
- Mobile App Development: Creating cross-platform mobile applications tailored to your business or academic needs.
π Letβs work together!
Get in touch for custom projects, research implementations, or business software.
π² WhatsApp: +2348067361023
Explore more on this website for more Free Source Codes, Tutorials, and Articles covering various programming languages.
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.