RENAMED add_reg.php -> save.php, and made lots of changes to the script: moved DB connection/auth to another file (connect.php), added more informative feedback for empty required fields error, added email address validation, better error handling (exit script and give feedback when there are errors) and changed deprecated mysql library for mysqli library.