Using PHP with MsAccess online

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
coder4life
Forum Newbie
Posts: 10
Joined: Sat May 22, 2010 6:59 pm

Using PHP with MsAccess online

Post by coder4life »

hi

i am not able to access the mysql db area of the server, so i need to use MSAccess.

i was hoping to find some example of how i can:

1) upload an access database to the folder of my choice via FTP to my hosted server (easy)

2) use a PHP form to create a new record in the db uploaded, or revise, or delete

3) display the contents of the entire database

i have been looking into ODBC but it seems as if that is only for a local network. the host i use does not allow asp, only php.

the php page(s) will be in the same directory (not the root, i dont have that access) as the MSAccess db. any clues how to do this, or working examples would be great

thanks
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Using PHP with MsAccess online

Post by Doug G »

Unless you're hosted on a windows server the odds are slim that you'll get an access db to work from your php code.

ODBC is the usual way to connect the database to your code, but the proper odbc drivers need to be installed on your web server, and the server has to have network access to the db, and the db has to be on a server that supports it.
coder4life
Forum Newbie
Posts: 10
Joined: Sat May 22, 2010 6:59 pm

Re: Using PHP with MsAccess online

Post by coder4life »

if we could assume for a moment the right drivers are installed, and there is network access, if my mdb file is located here:

http://mysite/db/myfile.mdb

what would the php code look like to successfully connect to the db?

thanks for your reply!
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Using PHP with MsAccess online

Post by alex.barylski »

Not sure what your asking exactly but...I would personally setup the MySQL database for remote connections (ask your host provider if this is possible) and use Access to administrate the data and a PHP interface for general public to submit new info, etc.

Then just link to the MySQL tables within Access - thats the easiest way. Setting up ODBC under LInux is a little more work if you want to connect to a Access from PHP.
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

Re: Using PHP with MsAccess online

Post by JakeJ »

Please tell us what hosting company gives you a php server without access to MySQL. We need to know so we can avoid them completely not to mention chide, castigate and ridicule them.
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Using PHP with MsAccess online

Post by Doug G »

I don't have any code samples handy, I haven't tried to connect to access via linux in years. Perhaps you can find some help in this google search: http://www.google.com/search?q=access+l ... =firefox-a
Post Reply