为什么我的网站在本地工作但不在在线服务器上工作?

I'm currently making a website with a friend using HTML/CSS/PHP. Everything has been going perfectly until we decided to transfer the files over to an online host for free to test it out. Unfortunately, it was not working properly. We have a database setup for the login system and whenever we attempt to register on the online host DB, it sends an error saying the page is not working.

I've tried multiple online hosts including 000webhost, however, all of them had similar issues. I've put them in the htdocs folder in the FTP server files as well, made the database with proper configuration, and made sure the user, database name, password, and host all were the same. Nothing works and it has me absolutely stump.

$host = "sql400.hitcluster.com";
$dbusername = "epiz_239708";
$dbpassword = "password";
$dbname = "epiz_23959708_House";

// Create connection
$conn = new mysqli($host, $dbusername, $dbpassword, $dbname);
?>
session_start();// Starting Session

//if session exit, user nither need to signin nor need to signup
if(isset($_SESSION['login_id'])){
  if (isset($_SESSION['pageStore'])) {
      $pageStore = $_SESSION['pageStore'];
header("location: $pageStore"); // Redirecting To Profile Page
    }
}

//Register progess start, if user press the signup button
if (isset($_POST['signUp'])) {
if (empty($_POST['fullName']) || empty($_POST['email']) || empty($_POST['newPassword'])) {
echo "Please fill up all the required field.";
}
else
{

$fullName = $_POST['fullName'];
$email = $_POST['email'];
$password = $_POST['newPassword'];
$hash = password_hash($password, PASSWORD_DEFAULT);

// Make a connection with MySQL server.
include('config.php');

$sQuery = "SELECT id from account where email=? LIMIT 1";
$iQuery = "INSERT Into account (fullName, email, password) values(?, ?, ?)";

// To protect MySQL injection for Security purpose
$stmt = $conn->prepare($sQuery);
$stmt->bind_param("s", $email);
$stmt->execute();
$stmt->bind_result($id);
$stmt->store_result();
$rnum = $stmt->num_rows;

if($rnum==0) { //if true, insert new data
          $stmt->close();

          $stmt = $conn->prepare($iQuery);
          $stmt->bind_param("sss", $fullName, $email, $hash);
          if($stmt->execute()) {
        echo 'Register successfully, Please login with your login details';}
        } else { 
       echo 'Someone already registered with this discord username';
     }
$stmt->close();
$conn->close(); // Closing database Connection
}
}

?> 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Register</title>
    <link rel="stylesheet" href="auth.css">
</head>
<body>
 <div class="rlform">
  <div class="rlform rlform-wrapper">
   <div class="rlform-box">
    <div class="rlform-box-inner">
     <form method="post" oninput='validatePassword()'>
      <p>Let's create your account</p>

     <div class="rlform-group">
      <label>Username</label>
      <input type="text" name="fullName" class="rlform-input" required>
     </div>

     <div class="rlform-group">                 
      <label>Discord Username and Identifier</label>
      <input type="text" name="email" class="rlform-input" placeholder = "EX: DiscordUser#1234" required>
     </div>

     <div class="rlform-group">                 
      <label>Password</label>
      <input type="password" name="newPassword" id="newPass" class="rlform-input" required>
     </div>

     <div class="rlform-group">
      <label>Confirm password</label>
      <input type="password" name="conformpassword" id="conformPass" class="rlform-input" required>
     </div>

      <button class="rlform-btn" name="signUp">Sign Up
      </button>

      <div class="text-foot">
       Already have an account? <a href="login.php">Login</a>
      </div>
     </form>
    </div>
   </div>
  </div>
 </div>

    <script>
        function validatePassword(){
  if(newPass.value != conformPass.value) {
    conformPass.setCustomValidity('Passwords do not match.');
  } else {
    conformPass.setCustomValidity('');
  }
}
    </script>
</body>
</html>

The code above shows the config.php and the register.php which are the error messages I receive from. It depends on the host, but I'd either get an error message saying the page isn't working or nothing at all happens. I'd expect the registration page to state that the user has registered successfully which later on proceeds to you being able to login, however, nothing even happens nor does the information I registered with show up on the database (phpMyAdmin). Hopefully you can help me out.