ممكن التعديل على الكود التالي:
<?php
$server = 'DESKTOP-PJDLJNR';
$database = 'Legacy';
$username = '';
$password = '';
$connection = new PDO("sqlsrv:Server=$server;Database=$database", $username, $password);
if (!$connection) {
die(print_r(sqlsrv_errors(), true));
}
$sql_query = 'SELECT * FROM Problemss';
$result = $connection->query($sql_query);
?>
<table border="1" width="100%">
<tr>
<th>تم</th>
<th>الحلول</th>
<th>المشكلة</th>
<th>م</th>
<th>الرقم</th>
</tr>
<?php while ($row = mysql_fetch_assoc($result)) { ?>
<tr>
<td><?php echo $row['تم']?></td>
<td><?php echo $row['الحلول']?></td>
<td><?php echo $row['المشكلة']?></td>
<td><?php echo $row['م']?></td>
<td><?php echo $row['الرقم']?></td>
</tr>
<?php
}
$connection = null; // close the connection
?>
</table>