Online Pharmacy Management System Project In Php -

if ($stmt->execute([$name, $email, $password, $phone])) header('Location: login.php?msg=registered'); else $error = "Registration failed. Email may already exist.";

-- Orders table CREATE TABLE orders ( id INT PRIMARY KEY AUTO_INCREMENT, user_id INT, order_number VARCHAR(50) UNIQUE, total_amount DECIMAL(10,2), payment_method ENUM('cod', 'card', 'online'), order_status ENUM('pending', 'confirmed', 'shipped', 'delivered', 'cancelled') DEFAULT 'pending', prescription_uploaded VARCHAR(255), created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (user_id) REFERENCES users(id) ); online pharmacy management system project in php

else // Logged-in user: store in database $user_id = $_SESSION['user_id']; $medicine_id = $_POST['medicine_id']; $quantity = $_POST['quantity']; $phone])) header('Location: login.php?msg=registered')

header('Location: cart.php'); ?> <?php require_once 'includes/config.php'; if (!isset($_SESSION['user_id'])) header('Location: login.php'); exit(); order_number VARCHAR(50) UNIQUE