Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel to PHP/MySQL

Status
Not open for further replies.

SLG

MIS
Dec 19, 2001
106
US
I'm new to PHP/MySQL and need some advice. I have an Excel spreadsheet that I'd like to import into MySQL and display it with a PHP based website.
Also, I only want authenticated users to be able to view the data and I want to give only a few people editor access to add/delete/modify the data.
Is there a sample database that I can work off of or a database similar to this already I can just use? I need to get this up and running pretty quick since the way I'm doing it right now is to modifiy the spreadsheet then save a read only copy to our file server.
Thanks in advance for your help!
 
you need a number of things:

1. save the excel spread sheet as comma or tab delimited values. ensure fields are properly quoted.
2. use phpmyadmin to import the csv into a new mysql database.
3. here is a link to a CRUD code that i wrote. this will handle the simple create, read, update, delete functions that are the core of any db application. it is dynamic so should just adjust to your table.
4. apply some page level access control to the CRUD control. at its easiest this could be a use of htaccess to force a password and then a check on the $_SERVER['PHP_AUTH'] variable to ascertain whether a user has the ability to perform a certain task. if you need finer control then i have published other code snips for handling access control in the forum. just search for them - they run the gamut from table based to file based backends.
 
Thanks jpadie!!!! I think this is exactly what I need!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top