I need help and hope you can help me! I use the below code but nothing displays. Additional check with phpinfo shows that everything on the server is in place. The db is at the right spot and there is no error for file not found, so the problem lies in the code from $dbNew and on.
What can I do/try? Thanks in advance.
<?php
$db = "vw.mdb";
if (!file_exists($db))
{
die("No database file.");
}
$dbNew = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=$db; Uid=; Pwd=;");
$sql = "select * from vw";
$rs = $dbNew->query($sql);
while($result = $rs->fetch())
{
echo $result[0].": ".$result[1]."<br />";
}
?>
Addition A: I have to add that I am new to PHP, forced to rewrite my Classic ASP code in PHP in order to risk being without any homepage beginning the day ASP is taken off Windows.