title: PHP 7.2.7 warning: Use of undefined constant
body: <p>So after I click submit on my index.php resgitration form.
  It all went good name, email, and password is saved from my database. But there is a warning that irrates me.</p>
  
  <blockquote>
    <p>Use of undefined constant result_query - assumed 'result_query' (this will throw an Error in a future version of PHP)</p>
  </blockquote>
  
  <p>Appears.</p>
  
  <p>It said it is in line 26.</p>
  
  <p>Here is my code on my function.php where the warning is coming from.</p>
  
  <pre><code>&lt;?php include "db.php" ?&gt;
  &lt;?php
  
  function createAccount(){
  global $connection;
  if(isset($_POST['submit'])){
  
      $name = $_POST['name'];
      $email = $_POST['email'];
      $password = $_POST['password'];
  
      $name = mysqli_real_escape_string($connection, $name);
      $passowrd = mysqli_real_escape_string($connection, $password);
  
      $hashFormat = "$2y$10$"; // blowfish encryting
      $salt = "dikoalampasswordqweqwe";
      $hashAndSalt = $hashFormat . $salt;
  
      $password = crypt($password, $hashAndSalt);
  
      $query = "INSERT INTO accounts_registered(name, email, password) ";
      $query .= "VALUES ('$name', '$email', '$password')";
  
      $result_query = mysqli_query($connection, $query);
  
      if(!result_query){
          die("Query Failed" . mysqli_error($connection));
      }
      else {
        $message = "Account Registered";
        echo "&lt;script type='text/javascript'&gt;alert('$message');&lt;/script&gt;";
  
        }
     }
  }
  
  
  ?&gt;
  </code></pre>