using this sql, make a USER registration php and html file
that:
- lets users create a new user by inserting into `USER` table. 
- Have them enter the password in twice to confirm it.
- Doesn't let them create an user if  a USERNAME exists with that name.
- prints out the error message from invalid entries visibly, and not at the top of the screen.

-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: May 07, 2023 at 10:56 PM
-- Server version: 5.7.42
-- PHP Version: 8.1.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `porporj2_starwars`
--

-- --------------------------------------------------------

--
-- Table structure for table `CART`
--

CREATE TABLE `CART` (
  `CARTID` int(11) NOT NULL,
  `ORDERID` int(11) NOT NULL,
  `CARTCOST` float(6,2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `CART_ITEM`
--

CREATE TABLE `CART_ITEM` (
  `CARTID` int(11) NOT NULL,
  `ITEMID` int(11) NOT NULL,
  `QUANTITY` int(11) NOT NULL,
  `ITEMCOST` float(6,2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `CATEGORIES`
--

CREATE TABLE `CATEGORIES` (
  `CATEGORYID` int(11) NOT NULL,
  `CATEGORYNAME` varchar(15) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `CATEGORIES`
--

INSERT INTO `CATEGORIES` (`CATEGORYID`, `CATEGORYNAME`) VALUES
(1, 'T-shirt'),
(2, 'Action Figure'),
(3, 'Keychain'),
(4, 'Funko'),
(5, 'Coffee Mug'),
(6, 'Backpack');

-- --------------------------------------------------------

--
-- Table structure for table `CLIENTS`
--

CREATE TABLE `CLIENTS` (
  `CUSTOMERID` int(10) UNSIGNED NOT NULL,
  `NAME` char(50) NOT NULL,
  `ADDRESS` char(100) NOT NULL,
  `DOB` date NOT NULL,
  `PHONE` char(10) DEFAULT NULL,
  `USERID` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `EMPLOYEE`
--

CREATE TABLE `EMPLOYEE` (
  `NAME` varchar(30) NOT NULL,
  `EMPLOYEE_ID` int(11) NOT NULL,
  `BDATE` date DEFAULT NULL,
  `STARTDATE` date DEFAULT NULL,
  `ADDRESS` varchar(30) DEFAULT NULL,
  `SEX` char(1) DEFAULT NULL,
  `PHONE` varchar(15) DEFAULT NULL,
  `SUPER_ID` int(11) NOT NULL,
  `USERID` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `Items`
--

CREATE TABLE `Items` (
  `ITEMID` int(11) UNSIGNED NOT NULL,
  `PRODUCTNAME` varchar(50) DEFAULT NULL,
  `PRODUCTDESCRIPTION` varchar(100) DEFAULT NULL,
  `QUANTITY` int(11) DEFAULT NULL,
  `PRICE` float(4,2) DEFAULT NULL,
  `CATEGORYID` int(11) NOT NULL,
  `EMPLOYEE_ID` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Items`
--

INSERT INTO `Items` (`ITEMID`, `PRODUCTNAME`, `PRODUCTDESCRIPTION`, `QUANTITY`, `PRICE`, `CATEGORYID`, `EMPLOYEE_ID`) VALUES
(1, 'Darth Vader T-shirt', 'A T-shirt with a Darth Vader themed design.', 10, 5.00, 1, NULL),
(2, 'Stormtrooper Action Figure', 'An action figure toy of a stormtrooper from the movie.', 10, 10.00, 2, NULL),
(3, 'Millennium Falcon Keychain', 'A keychain of the Millennium Falcon.', 15, 3.00, 3, NULL),
(4, 'Yoda Funko Pop Bobblehead', 'Yoda, as a stylized POP vinyl from Funko!', 10, 10.00, 4, NULL),
(5, 'Boba Fett Coffee Mug', 'Coffee mug with a Boba Fett design.', 5, 5.00, 5, NULL),
(6, 'Darth Vader Backpack', 'Useable backpack with Darth Vader theme.', 5, 12.00, 6, NULL),
(7, 'Stormtrooper T-shirt', 'T-shirt with stormtrooper design.', 10, 10.00, 1, NULL),
(8, 'Millenium Falcon Toy', 'A playable toy of the Millennium Falcon.', 4, 20.00, 2, NULL),
(9, 'Yoda Keychain', 'A keychain of the Jedi Yoda', 15, 3.00, 3, NULL),
(10, 'Boba Fett Funko Pop Bobblehead', 'Boba Fett as stylized POP vinyl.', 10, 10.00, 4, NULL),
(11, 'Darth Vader Coffee Mug', 'Coffee mug with Darth Vader theme.', 5, 5.00, 5, NULL),
(12, 'Stormtrooper Backpack', 'Useable backpack with Stormtrooper theme.', 10, 12.00, 6, NULL),
(13, 'Millenium Falcon T-shirt', 'T-shirt with Millenium Falcon design.', 10, 9.00, 1, NULL),
(14, 'Yoda Action Figure', 'An action figure of Jedi Master Yoda.', 10, 15.00, 2, NULL),
(15, 'Boba Fett Keychain', 'A keychain of the character Boba Fett', 15, 3.00, 3, NULL),
(16, 'Darth Vader Funko Pop Bobblehead', 'Darth Vader as stylized POP vinyl.', 10, 11.00, 4, NULL),
(17, 'Stormtrooper Coffee Mug', 'Coffe Mug with stormtrooper design.', 10, 5.00, 5, NULL),
(18, 'Millenium Falcon Backpack', 'Useable backpack with Millennium Falcon theme.', 10, 12.00, 6, NULL),
(19, 'Yoda T-shirt', 'A T-shirtwith desgin of the Jedi Yoda', 15, 10.00, 1, NULL),
(20, 'Boba Fett Action Figure', 'An Action Figure of Boba Fett from Star Wars', 12, 15.00, 2, NULL),
(21, 'Darth Vader Keychain', 'A keychain with Darth Vader theme.', 15, 3.00, 3, NULL),
(22, 'Stormtrooper Funko Pop Bobblehead', 'A Stormtrooper as a stylized POP vinyl.', 15, 10.00, 4, NULL),
(23, 'Millenium Falcon Coffee Mug', 'Coffee Mug with Millenium Falcon design.', 10, 5.00, 5, NULL),
(24, 'Yoda Backpack', 'Useable backpack with Jedi Master Yoda design.', 10, 12.00, 6, NULL),
(25, 'Boba Fett T-shirt', 'A T-shirt with desgin of the character Boba Fett', 15, 10.00, 1, NULL),
(26, 'Darth Vader Action Figure', 'An action figure of the character Darth Vader.', 10, 15.00, 2, NULL),
(27, 'Stormtrooper Keychain', 'A keychain with stormtrooper design.', 15, 3.00, 3, NULL),
(28, 'Millenium Falcon Funko Pop Bobblehead', 'Millennium Falcon as a stylized vinyl POP.', 10, 18.00, 4, NULL),
(29, 'Yoda Coffee Mug', 'A coffee mug with desgin of the Jedi Yoda', 15, 5.00, 5, NULL),
(30, 'Boba Fett Backpack', 'Useable backpack with Boba Fett design.', 10, 12.00, 6, NULL),
(31, 'Luke Skywalker Keychain', 'A keychain of Jedi Luke Skywalker', 10, 3.00, 3, NULL),
(32, 'Han Solo Backpack', 'Useable backpack with Han Solo theme.', 5, 12.00, 6, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `ORDERS`
--

CREATE TABLE `ORDERS` (
  `ORDERID` int(11) NOT NULL,
  `DATE` date DEFAULT NULL,
  `TIME` time DEFAULT NULL,
  `CUSTOMERID` int(11) NOT NULL,
  `TOTALCOST` float(6,2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `ORDER_ITEM`
--

CREATE TABLE `ORDER_ITEM` (
  `ORDERID` int(11) NOT NULL,
  `ITEMID` int(11) NOT NULL,
  `QUANTITY` int(11) NOT NULL,
  `ITEMCOST` float(6,2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `USERS`
--

CREATE TABLE `USERS` (
  `USERID` int(11) NOT NULL,
  `USERNAME` varchar(30) NOT NULL,
  `PASSWORD` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `CART`
--
ALTER TABLE `CART`
  ADD PRIMARY KEY (`CARTID`),
  ADD KEY `ORDERID` (`ORDERID`);

--
-- Indexes for table `CART_ITEM`
--
ALTER TABLE `CART_ITEM`
  ADD PRIMARY KEY (`CARTID`,`ITEMID`),
  ADD KEY `ITEMID` (`ITEMID`);

--
-- Indexes for table `CATEGORIES`
--
ALTER TABLE `CATEGORIES`
  ADD PRIMARY KEY (`CATEGORYID`);

--
-- Indexes for table `CLIENTS`
--
ALTER TABLE `CLIENTS`
  ADD PRIMARY KEY (`CUSTOMERID`),
  ADD KEY `Client_user` (`USERID`);

--
-- Indexes for table `EMPLOYEE`
--
ALTER TABLE `EMPLOYEE`
  ADD PRIMARY KEY (`EMPLOYEE_ID`),
  ADD KEY `Emp_super` (`SUPER_ID`),
  ADD KEY `Emp_user` (`USERID`);

--
-- Indexes for table `Items`
--
ALTER TABLE `Items`
  ADD PRIMARY KEY (`ITEMID`),
  ADD KEY `FKCATEGORY` (`CATEGORYID`),
  ADD KEY `FKemployee` (`EMPLOYEE_ID`);

--
-- Indexes for table `ORDERS`
--
ALTER TABLE `ORDERS`
  ADD PRIMARY KEY (`ORDERID`),
  ADD KEY `CUSTOMERID` (`CUSTOMERID`);

--
-- Indexes for table `ORDER_ITEM`
--
ALTER TABLE `ORDER_ITEM`
  ADD PRIMARY KEY (`ORDERID`,`ITEMID`),
  ADD KEY `ITEMID` (`ITEMID`);

--
-- Indexes for table `USERS`
--
ALTER TABLE `USERS`
  ADD PRIMARY KEY (`USERID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `CART`
--
ALTER TABLE `CART`
  MODIFY `CARTID` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `CATEGORIES`
--
ALTER TABLE `CATEGORIES`
  MODIFY `CATEGORYID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `CLIENTS`
--
ALTER TABLE `CLIENTS`
  MODIFY `CUSTOMERID` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `EMPLOYEE`
--
ALTER TABLE `EMPLOYEE`
  MODIFY `EMPLOYEE_ID` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `Items`
--
ALTER TABLE `Items`
  MODIFY `ITEMID` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `ORDERS`
--
ALTER TABLE `ORDERS`
  MODIFY `ORDERID` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `USERS`
--
ALTER TABLE `USERS`
  MODIFY `USERID` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;