اینو امتحان کنید
<?php
require('include/function.php');
if(isset($_POST['username']) and (isset($_POST['password'])))
{
$username=$_POST['username'];
$password=$_POST['password'];
}
$connection = mysql_connect("localhost","****","****");
if (!$connection)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("tookaen1_nod_ap", $connection);
$sql="SELECT username FROM tblname WHERE username='".$username."'";
mysql_query("SET CHARACTER SET utf8");
$result=mysql_query($sql);
echo "<table border='1'>
<tr>
<th>کد</th>
<th>مدير آموزشگاه</th>
<th>نام آموزشگاه</th>
<th>ايجاد اشتراک</th>
<th>اتمام اشتراک</th>
<th> </th>
<th> </th>
<th>نام کاربري</th>
<th>کلمه عبور</th>
</tr>";
while($row = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['namefamil'] . "</td>";
echo "<td>" . $row['schlname'] . "</td>";
echo "<td>" . $row['datsabt'] . "</td>";
echo "<td>" . $row['endtime'] . "</td>";
echo "<td>" . $row['ten'] . "</td>";
echo "<td>" . $row['ten'] . "</td>";
echo "<td>" . $row['username'] . "</td>";
echo "<td>" . $row['password'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>