title: this is my simple php script for login, i cannot POST values from database
body: <p>this is the whole php script. nothing happens after connecting to database</p>
  
  <pre><code>$con = mysqli_connect("localhost:3306", "xyz", "xyz", "xyz");
  echo "connected to the database";
  
  if (mysqli_connect_errno()) {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  </code></pre>
  
  <p>this is the php script after the form is connected to database.</p>
  
  <pre><code>if (isset($_POST['submit']))
   //program never enters this
  {
      if (isset($_POST['id']) &amp;&amp; isset($_POST['name']) &amp;&amp; ($_POST['pass'])) {
          $i_d = $_POST['id'];
          $username = $_POST['uname'];
          $password = $_POST['pass'];
          $sql = "SELECT * FROM emp WHERE ID='$i_d' and User_Name='$username' and  Password='$password' and active=1";
          $result = mysqli_query($con, $sql) or die(mysqli_error());
          $count = mysqli_num_rows($result);
          if ($count == 1) {
              echo "You are logged in";
          } else {
              echo "Login Failed";
          }
      }
  }
  </code></pre>