abhi_madhani Posted April 7, 2010 Share Posted April 7, 2010 Hi friends I am developing a functionality in a website where a Admin can publish/save 'excel' files to a database, that are uploaded to a server by members. To achieve this I have devised the following steps. 1. A webpage that let admin view all the files uploaded on the server in a particular directory (.files/) . - DONE 2. A PHP code that can grab names of the files in a array. 3. A PHP wepage that can automatically publish/save those file to a database, without human intervention. [This page being able to read the array, and store the results in a database]. Its a bit complicated process, but does anyone knows how to acheive this as to what should steps should I take to acheive this. Please guide me through this. If you want any more clarification as to what I am trying to achieve, then in simple term 'Publishing a file to database, via web interface'. Regards, Abhishek Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/ Share on other sites More sharing options...
hackalive Posted April 7, 2010 Share Posted April 7, 2010 Is it really not saving the files in a DB, just the file names? Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038282 Share on other sites More sharing options...
abhi_madhani Posted April 7, 2010 Author Share Posted April 7, 2010 Hi, I am already saving the file name to a seperate table in a database. - Acheived this by listing the file name, and passing the name as a variable to mysql_query insert statement. Now I need is to a 'save the data in those excel files' into the 'database'. - Controlling this via Web Inteface. Regards, Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038284 Share on other sites More sharing options...
five Posted April 7, 2010 Share Posted April 7, 2010 meaning an excel file parser in php ? Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038288 Share on other sites More sharing options...
hackalive Posted April 7, 2010 Share Posted April 7, 2010 So basically you want some PHP which reads the file (eg excel) and gets its internal (stuff) and copy it to a DB, and presumably have something work in reverse so you can download it? Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038290 Share on other sites More sharing options...
abhi_madhani Posted April 7, 2010 Author Share Posted April 7, 2010 Yes, Five Sort of a 'Excel File Parser' in PHP. I am already using PHPfileexplorer tool but that only good to retrieve data from excel file to html, but not to save that data in database. Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038292 Share on other sites More sharing options...
abhi_madhani Posted April 7, 2010 Author Share Posted April 7, 2010 Hi hacklive Yes exactly what you have mentioned, that something that can retrieve data from excel files, and store them in database, This below mentioned Future and advance coding, only to be done once the above step is accomplished. the reverse options is not that important, because if a member can upload only one excel file. and if he uploads a new file, than all his previous data stored in database will also be updated with new changes. Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038294 Share on other sites More sharing options...
hackalive Posted April 7, 2010 Share Posted April 7, 2010 what about getting the HTML as a PHP string? then inputting to a DB Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038295 Share on other sites More sharing options...
hackalive Posted April 7, 2010 Share Posted April 7, 2010 Hi hacklive Yes exactly what you have mentioned, that something that can retrieve data from excel files, and store them in database, This below mentioned Future and advance coding, only to be done once the above step is accomplished. the reverse options is not that important, because if a member can upload only one excel file. and if he uploads a new file, than all his previous data stored in database will also be updated with new changes. If the reverse is not importnat why upload at all, its just going to sit there and noone can see or download it ???? makes little sense ???? Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038296 Share on other sites More sharing options...
abhi_madhani Posted April 7, 2010 Author Share Posted April 7, 2010 Hi, hacklive What you have suggested is exact solution, but just for a single excel file. The admin will have many excel files to process, and for that it may not be possible using the above mentioned method. Is there any other solution, that can process many files together. The uploaded excel files, are not just ordinary files, that are product files for merchants, which will be stored in the database. Once the products from particular merchants are stored, then anybody can view them via Web Interface. I am building a site just similar to 'Auction or Shopping website' but where sellers can upload their products via excel file. Link to comment https://forums.phpfreaks.com/topic/197855-building-a-file-publishing-tool-web-page/#findComment-1038304 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.