$query = "SELECT * FROM users WHERE username = '$username' AND password = '$password'"; $result = mysqli_query($conn, $query);
header('Location: login.php'); exit; }
Now, let's create the PHP scripts to implement the Work Order Management System. Create a register.php file to handle user registration:
<?php // Connect to the database $conn = mysqli_connect('localhost', 'username', 'password', 'database');
// Login user if ($_SERVER["REQUEST_METHOD"] == "POST") { $username = $_POST['username']; $password = $_POST['password'];