I have described the problem below:
My PHP code:
<?
$conn = odbc_connect("DSN1","","");
$sql = "SELECT * from PLAYER";
$rs = odbc_exec($conn, $sql);
if($rs) {
echo "you have successfully connected php to ms access";
echo "<table style='color: white; background-color:yellow; border:5px solid'>";
while(odbc_fetch_row($rs) ) {
echo "<tr style='background-color:green; border:2px solid'>";
echo "<td>"; echo odbc_result($rs,2); echo "</td>";
echo "<td>"; echo odbc_result($rs,3); echo "</td>";
echo "<td>"; echo odbc_result($rs,4); echo "</td>";
echo "<td>"; echo odbc_result($rs,5); echo "</td>";
echo "</tr>";
}
echo "</table>";
}
else {
echo "you request for connection from php to ms access is unsuccessful";
}
?>
My Access Database:
DSN:
Even after creating the dsn, I cant get the output.
Output:
Can anyone help?