Connecting Tech Pros Worldwide Forums | Help | Site Map

Is it poosible to read data from a database and add to a document using PHP?

Newbie
 
Join Date: Mar 2008
Posts: 20
#1: Mar 4 '08
HI,

I need to connect to a database in MS Access and then extract the data that is there and insert it into a word file. is it possible to do this using PHP? Along with posting the data onto the document file i need to display it on the web page as well. Is this possible through PHP. I am quite new to the world of PHP. ihave read tutorials but havent managed to find anything that would help me. Please let me know if this can be done and if it can how. Direct me to appropriate sources.

Thanks

ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#2: Mar 4 '08

re: Is it poosible to read data from a database and add to a document using PHP?


Yes, you can get table data from an Access table using PHP odbc or a package like ADODB. And it is also quite easy to display that data in the browser. Another thing is building a Word document or inserting that data in an existing Word document. That i not so easy.

Ronald
Newbie
 
Join Date: Mar 2008
Posts: 20
#3: Mar 5 '08

re: Is it poosible to read data from a database and add to a document using PHP?


Hi Ronald,
Could you please direct me to some good tutorial in this context that is how to make a connection using ODBC and which has some sample code as well where some data is being picked from a database and displayed on a web page?

Thanks,


Quote:

Originally Posted by ronverdonk

Yes, you can get table data from an Access table using PHP odbc or a package like ADODB. And it is also quite easy to display that data in the browser. Another thing is building a Word document or inserting that data in an existing Word document. That i not so easy.

Ronald

Newbie
 
Join Date: Mar 2008
Posts: 20
#4: Mar 5 '08

re: Is it poosible to read data from a database and add to a document using PHP?


I think i had misunderstood the problem completely. Actualy the database consists of list of names of files that are related to a particular link.What i need to do is when that link is clicked go into the database and see which files should be available to the user and knowing that ,the files should be available on the next page. then i click on the file name and the file opens and i can view it.All files are word files.

Quote:

Originally Posted by learnPHP

Hi Ronald,
Could you please direct me to some good tutorial in this context that is how to make a connection using ODBC and which has some sample code as well where some data is being picked from a database and displayed on a web page?

Thanks,

Reply