title: Why does my website work locally but not on an online server?
body: <p>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. </p>
  
  <p>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. </p>
  
  <pre><code>$host = "sql400.hitcluster.com";
  $dbusername = "epiz_239708";
  $dbpassword = "password";
  $dbname = "epiz_23959708_House";
  
  // Create connection
  $conn = new mysqli($host, $dbusername, $dbpassword, $dbname);
  ?&gt;
  </code></pre>
  
  <pre><code>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-&gt;prepare($sQuery);
  $stmt-&gt;bind_param("s", $email);
  $stmt-&gt;execute();
  $stmt-&gt;bind_result($id);
  $stmt-&gt;store_result();
  $rnum = $stmt-&gt;num_rows;
  
  if($rnum==0) { //if true, insert new data
            $stmt-&gt;close();
  
            $stmt = $conn-&gt;prepare($iQuery);
            $stmt-&gt;bind_param("sss", $fullName, $email, $hash);
            if($stmt-&gt;execute()) {
          echo 'Register successfully, Please login with your login details';}
          } else { 
         echo 'Someone already registered with this discord username';
       }
  $stmt-&gt;close();
  $conn-&gt;close(); // Closing database Connection
  }
  }
  
  ?&gt; 
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width,initial-scale=1"&gt;
      &lt;title&gt;Register&lt;/title&gt;
      &lt;link rel="stylesheet" href="auth.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
   &lt;div class="rlform"&gt;
    &lt;div class="rlform rlform-wrapper"&gt;
     &lt;div class="rlform-box"&gt;
      &lt;div class="rlform-box-inner"&gt;
       &lt;form method="post" oninput='validatePassword()'&gt;
        &lt;p&gt;Let's create your account&lt;/p&gt;
  
       &lt;div class="rlform-group"&gt;
        &lt;label&gt;Username&lt;/label&gt;
        &lt;input type="text" name="fullName" class="rlform-input" required&gt;
       &lt;/div&gt;
  
       &lt;div class="rlform-group"&gt;                 
        &lt;label&gt;Discord Username and Identifier&lt;/label&gt;
        &lt;input type="text" name="email" class="rlform-input" placeholder = "EX: DiscordUser#1234" required&gt;
       &lt;/div&gt;
  
       &lt;div class="rlform-group"&gt;                 
        &lt;label&gt;Password&lt;/label&gt;
        &lt;input type="password" name="newPassword" id="newPass" class="rlform-input" required&gt;
       &lt;/div&gt;
  
       &lt;div class="rlform-group"&gt;
        &lt;label&gt;Confirm password&lt;/label&gt;
        &lt;input type="password" name="conformpassword" id="conformPass" class="rlform-input" required&gt;
       &lt;/div&gt;
  
        &lt;button class="rlform-btn" name="signUp"&gt;Sign Up
        &lt;/button&gt;
  
        &lt;div class="text-foot"&gt;
         Already have an account? &lt;a href="login.php"&gt;Login&lt;/a&gt;
        &lt;/div&gt;
       &lt;/form&gt;
      &lt;/div&gt;
     &lt;/div&gt;
    &lt;/div&gt;
   &lt;/div&gt;
  
      &lt;script&gt;
          function validatePassword(){
    if(newPass.value != conformPass.value) {
      conformPass.setCustomValidity('Passwords do not match.');
    } else {
      conformPass.setCustomValidity('');
    }
  }
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>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.</p>