DB Connection Insert Display

DB Connection

@mysql_connect($host,$username,$password);
@mysql_select_db($dbname);

===========================================================

<?php
include'connection.php';

?>
<html>
<body>
<?php
$query=mysql_query("Select name,email * order by id desc from students_record whare name='xyz' LIMIT 5");
while ($result=mysql_fetch_array($query))
{
echo $result['name']."".$result['email']. "br";
}


?>
<input type="text" name='' " id= ""  value= "<?php echo$result['name'];?>"    />

</body>
</html>

==============================================================
<?php
$query=mysql_query("Select* from students_record order by joining date");
while($result=mysql_fetch_array($query))
{ ?>
<table border=1 cellpadding="10">
<tr>
<th>Name</th>
<th>Email</th>
<th>Address</th>
<th>Date</th>
</tr>
<?php
$query=mysql_query("Select * from students_record order by joining date");
while($result=mysql_fetch_array($query))
{?>
<?php
<tr><td><?php echo$result['name'];?></td>
<td><?php echo$result['email'];?></td>
}  ?>  </tr>