title: My SQL did not return the expected value
body: <p>I am new to phpMySQL and php. and I am trying to get a value from database and put it in a textbox. 
  Currently, I only have 1 value in my table to test the code:</p>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;?php
  $mysql_hostname = "localhost";
  $mysql_user = "root";
  $mysql_password = "";
  $mysql_database = "dbtest";
  $tbl_name="tbltest";
  
  $con = mysql_connect("$mysql_hostname","$mysql_user","$mysql_password");
  
  if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
  
  mysql_select_db("$mysql_database", $con);
  $all = mysql_query("SELECT Balance FROM tbltest");
  ?&gt;
  </code></pre>
  
  <p>And then in my HTML side, I have this:</p>
  
  <pre><code>&lt;input type="text" name="Balance" value="&lt;?php echo $all; ?&gt;" /&gt;
  </code></pre>
  
  <p>But when I tried to run the code the value that appears in the textbox is:</p>
  
  <pre><code>Resource Id #4
  </code></pre>
  
  <p>What did I miss?
  Thank you for the help</p>