<?php
include('constant/connect.php');

$name = $_POST['name'];
$dept = $_POST['department'];

$image = $_FILES['image']['name'];
$tmp = $_FILES['image']['tmp_name'];

move_uploaded_file($tmp, "assets/uploadImage/".$image);

$connect->query("INSERT INTO doctors (name, department, image, status)
VALUES ('$name','$dept','$image',1)");

header("Location: add_doctor.php");
?>