php

<?php
$con=mysql_connect("localhost","root","1234567");
mysql_select_db("kelidestan");

// Check connection
if (!$con){
     die("به دلیل مشکل زیر، اتصال برقرار نشد : <br />" . mysql_error());
}

$result = mysql_query("SELECT * FROM students",$con);

echo "<table border='1'>
<tr>
<th>name</th>
<th>mark</th>
</tr>";

while($row = mysql_fetch_array($result)){
     echo "<tr>";
     echo "<td>" . $row['name'] . "</td>";
     echo "<td>" . $row['mark'] . "</td>";
     echo "</tr>";
}
echo "</table>";

mysql_close($con);
?>
" . mysql_error()); } $result = mysql_query("SELECT * FROM students",$con); echo ""; while($row = mysql_fetch_array($result)){ echo ""; echo ""; echo ""; echo ""; } echo "
name mark
" . $row['name'] . "" . $row['mark'] . "
"; mysql_close($con); ?>
فارسی