title: php doesnt connect with mysql
body: <p>I'm new to web design, I'm using sublime text editor for PHP and MAMP server. When I run my page in browser, I think MYSQLdatabase is connected but I didn't get correct output. My PGM is below:</p>
  
  <p>basicform.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;A BASIC HTML FORM&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;Form name ="form1" Method ="POST" Action ="submitForm.php"&gt;
  
          &lt;INPUT TYPE = "TEXT" VALUE ="username" Name ="username"&gt;
          &lt;INPUT TYPE = "Submit" Name = "Submit1" VALUE = "Login"&gt;
      &lt;/FORM&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>submiteForm.php</p>
  
  <pre><code>&lt;?PHP
  $con = mysql_connect("localhost","root","root");
  
  if (mysqli_connect_errno($con)) {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
  } else echo "success";
  
  mysql_select_db("innowell",$con) or die(mysql_error());
  
  $query = "SELECT * FROM employees";
  $result = mysql_query($query);
  
  echo $result;
  
  $username = $_POST['username'];
  
  if ($username == "letmein") {
      print ("Welcome back, friend!");
  } else {
      print ("You're not a member of this site");
  }
  
  ?&gt;
  </code></pre>
  
  <p>Output:  </p>
  
  <blockquote>
    <p>success  Resource id #3  You're not a member of this site.</p>
  </blockquote>
  
  <p>what is the error in my pgm.can anyone help me to get solution?</p>