Page 1 of 1

Connecting to access database with php

Posted: Wed Nov 05, 2008 11:37 pm
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

Re: Connecting to access database with php

Posted: Thu Nov 06, 2008 12:06 am
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

Re: Connecting to access database with php

Posted: Thu Nov 06, 2008 9:06 am
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.

Re: Connecting to access database with php

Posted: Mon Nov 10, 2008 3:06 pm
by pwrmngr
I am still so lost :(

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

Thanx for the input :)