PHP won't connect to .mdb database
I am trying to connect to an Access database (*.mdb) via PHP and am having
difficulty connecting. I have tested this connect line in a different
script with a different database ('database1') and it works just fine. I
literally copied, pasted, changed the database name (to 'database2', and
neither database had usernames or passwords set, thus those fields are
empty) and suddenly I get my "Connection Failed" message. All are in the
same folder. It's killing me. I know it will be some stupidity on my part
but I can't figure out what it is and I am in a time crunch.
Thanks!
My code snippet:
<html>
<body>
<?php
$conn=odbc_connect('database2','','');
if (!$conn)
{exit("Connection Failed." . $conn);}
#smart stuff to be added later
?>
</body>
</html>
No comments:
Post a Comment