显示mysql数据库字段

I have a from which is linked to a PHP script. When the user enters their username I want to to display fields regarding to their record. Specifically 'DOB' and 'email'.

The problem is, when i enter the username it opens test.php but does not show up any records.

My form is:

<form id="form1" name="form1" method="post" action="test.php">
  <label>Name
  <input type="text" name="textfield" />
  </label>
  <p>
    <label>
    <input type="submit" name="Submit" value="Submit" />
    </label>

  </p>
</form>

My PHP script is:

  <?php 

    $host=""; // Host name 
    $username=""; // Mysql username 
    $password=""; // Mysql password 
    $db_name=""; // Database name 
    $tbl_name="members"; // Table name  

mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

     $username = $_POST['textfield'];
      echo '</br>';
     $query = mysql_query("SELECT * FROM `members` WHERE `username`='$username'");

    while($result = mysql_fetch_array($query)) {
    //display
    echo $result['DOB'];
    echo $result['email'];
    }
    ?>

You should connect to a database before you run any queries:

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);

Instead of

$query = mysql_query("SELECT * FROM `orders` WHERE `username`='$username'");

do this:

$sql = "SELECT * FROM `orders` WHERE `username`='$username'";
$query = mysql_query($sql) or die(mysql_error());
echo 'SQL=' . $sql;

What result do you get? (What is SQL?)