Connecting to access database with php

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
pwrmngr
Forum Newbie
Posts: 2
Joined: Thu Dec 07, 2006 1:38 pm

Connecting to access database with php

Post by pwrmngr »

Ok I am SO NEW to this so bare with me. I have created an Access Database called registration.mdb and I have a sign up for a website I am doing here, http://www.exelta.ca/tests/Registration ... ation.html, chose Recreational Or Competition.

Now after going through all the steps and hit submit it DOESN'T die or give me the error Could not connect to ODBC database! BUT it also doesn't insert the info into the database and I am wondering what I am doing wrong?

This is the link to a text file of the coding http://members.shaw.ca/yz426f/registration-submit.txt

and also http://members.shaw.ca/yz426f/ the mdb and php file is there for you to download and look at.

Once again THANX for your help
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Re: Connecting to access database with php

Post by infolock »

first of all, google is your friend when you are starting out. Here is a very good link to get you started

Secondly, connecting to an Access Database requires using the ODBC functions, and you also need to make sure ODBC is enabled in your php.ini.

Finally, the function you are looking for to connect to ODBC is odbc-connect
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Connecting to access database with php

Post by Doug G »

In addition to making sure ODBC is properly setup, if Access from php works like Access from asp, you need to make sure the windows file permissions allow the web server user account write permission to the .mdb file.
pwrmngr
Forum Newbie
Posts: 2
Joined: Thu Dec 07, 2006 1:38 pm

Re: Connecting to access database with php

Post by pwrmngr »

I am still so lost :(

I have not made/have a php.ini file?

Thanx for the input :)
Post Reply