-- Cart table CREATE TABLE cart ( id INT PRIMARY KEY AUTO_INCREMENT, user_id INT, medicine_id INT, quantity INT, added_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (user_id) REFERENCES users(id), FOREIGN KEY (medicine_id) REFERENCES medicines(id) );
For maintainability, we recommend a architecture even in core PHP. However, for simplicity in a student project, a procedural or object-oriented approach without a full framework works well. online pharmacy management system project in php