title: Running PHP in HTML error (This page isn’t working)
body: <p>I setup this signup form for my website. People enter their username, email and password and then it uses php to add it to my database. But I keep getting this error when I run my code. My html file is on my AWS server as well as this PHP file, so I believe there must be an error in my code. I am still very new to PHP. </p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form method="get" action="signup_form.php"&gt;
      &lt;input style="width: 300px; display: block; margin-left: auto; margin-right: auto;" type="text" name="signup_name" placeholder="Screen Name"&gt;
      &lt;br&gt;
      &lt;input style="width: 300px; display: block; margin-left: auto; margin-right: auto;" type="text" name="signup_mail" placeholder="Your E-mail"&gt;
      &lt;br&gt;
      &lt;input style="width: 300px; display: block; margin-left: auto; margin-right: auto;" type="password" name="signup_password" id = "password" placeholder="Create Password" required&gt;
      &lt;br&gt;
      &lt;input style="width: 300px; display: block; margin-left: auto; margin-right: auto;" type="password" name="confirm_password" id = "confirm_password" placeholder="Repeat Password" required&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;button onclick="validatePassword()" class="button" style="display: block; margin-left: auto; margin-right: auto;" type="submit" name="submit_login"&gt;
          SUBMIT
      &lt;/button&gt;
  
  
  &lt;/form&gt;
  </code></pre>
  
  <p>and here is my PHP code:</p>
  
  <pre><code>&lt;?php
  $signup_name = filter_input(INPUT_GET, 'signup_name');
  $signup_mail = filter_input(INPUT_GET, 'signup_mail');
  $signup_password = filter_input(INPUT_GET, 'signup_password');
  
  if (!empty($signup_name)){
  if (!empty($signup_mail)){
      $host = "wildwea.......onaws.com";
      $dbusername = "a....in";
      $dbpassword = ".Bi....4.";
      $dbname = "innodb";
   // Create connection
      $conn = new mysqli ($host, $dbusername, $dbpassword, $dbname);
      if (mysqli_connect_error()){
          die('Connect Error ('. mysqli_connect_errno() .') '
              . mysqli_connect_error());
      }
      else{
  
          $sql = "SELECT EXISTS (SELECT 1 FROM Users WHERE Email = $signup_mail);"
          if ($sql = 0){
  
              $sql = "INSERT INTO Users (Username, Email, Pword)
              values ('$signup_name', '$signup_mail',md5('$signup_password'))";
  
              if ($conn-&gt;query($sql)){
                  echo "New record is inserted sucessfully";
              }
              else{
                  echo "Error: ". $sql ."
                  ". $conn-&gt;error;
              }
              $conn-&gt;close();
          } else {
              echo "User already in database";
          }
      }
  }
  else{
      echo "Password should not be empty";
      die();
  }
  }
  else{
      echo "Username should not be empty";
      die();
  }
  ?&gt;
  </code></pre>
  
  <p>If you want to see the error here is the link to the sign up page:
  <a href="http://thewildwear.com/signup.html" rel="nofollow noreferrer">http://thewildwear.com/signup.html</a></p>