<?php
include("db.php");
if(isset($_POST['submit'])){
$result = mysqli_query($conn, "INSERT INTO users(username,department,email,password )VALUES('$_POST[username]','$_POST[department]','$_POST[email]','$_POST[password]')");

}

?>

<!DOCTYPE html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <title>Driver Logbook</title>
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
    <link rel="stylesheet" href="assets/css/Login-Form-Clean.css">
    <link rel="stylesheet" href="assets/css/Login-Form-Dark.css">
    <link rel="stylesheet" href="assets/css/Registration-Form-with-Photo.css">
    <link rel="stylesheet" href="assets/css/styles.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script></head>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>


<div class="container" style=" max-width:1000px; width:90%; margin:auto; border-radius:20px;">
<div style="margin-top:10%;"class="panel panel-default">


      <div class="well text-center"><h1> Add Driver</h1></div>


<div class="panel-body">
  <form action="add-driver.php" method="POST">
    <div class="form-group">
    <label style="font-size:25px">Driver Name<label>
      <input style="margin-left:18%; width:420px;"type="text" name="username" id="name" class="form-control" required>
    </div>

    <div class="form-group">
    <label style="font-size:25px">Department<label>
      <input style="margin-left:20%; width:420px;"type="text" name="department" id="name" class="form-control" required>
    </div>

    <div class="form-group">
    <label style="font-size:25px">Email<label>
      <input style="margin-left:38%; width:420px;" type="email" name="email" id="name" class="form-control" required>
    </div>

    <div class="form-group">
    <label style="font-size:25px">Password<label>
      <input style="margin-left:26%; width:420px;" type="password" name="password" id="name" class="form-control" required>
    </div>

    <div class="form-group">
      <input type="submit" name="submit" value="submit" class="btn btn-primary" required>
    </div>
  </form>

</div>

</div>
</div>
