Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone know of an online CSV editor written in PHP that will allow a user to open, edit, and save a given CSV file?
All I can find are CSV classes and nothing that can handle dynamic files, just predefined lengths etc.
Parse the CSV file into array. Then, use an array of arrays to populate a matrix of text boxes in your web page. When you submit the form, read the data from $_POST and use fputcsv() to save it.
Think about validation, if relevant.
So you want to be able to open a file, edit it using a web based UI and save it?
Why not use Google Docs?
EDIT: Its irritating when people vote you down without leaving a comment as to why... Useless contributions...
fgetcsv would solve your issue. Basically it takes in CSV file and parses it out into an array.
http://www.phpclasses.org/package/2124-PHP-Retrieve-or-change-information-stored-in-CSV-files.html
Point it at a csv, tell it the delimiter, unique field and tell it to edit. Very simple to use. I've had an issue with the delete button but I only just tried it for the first time, I'm sure I can work that out.
Saved me some hours trying to build and test my own.
Edit: Worked out the issue with the unique column (or KeyFieldName as he calls it) don't have spaces in the name of that column (the first row of the csv)
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I have to work with huge arrays sometimes. I mean really long nested arrays in PHP and when I print_r them you don't have a chance to understand anything it's so much, then I use print_r in between HTML <pre></pre> which makes it a bit better.
I'm searching for an online array helper where I copy the array, put it in and then can see how to access a certain value. It's just hard to try to figure out, hey I need to do: $array[0][test][4][value]
Is there a tool which helps to find what I'm looking for in an array and how to access it?
A way is to output your huge array as a JSON with echo json_encode($array);.
You can put the output then in some kind of JSON inspector tool. I use JsonFormatter by Curiousconcept, or just inspect the raw output from the URL it's outputted on with this JSONVue plugin for chrome
If you use any good IDE (like VSCode or PHPStorm) you can add the contents to a .json file and let your IDE format the file, after which you get folding icons in the gutter.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I know I could code what I'm trying to achieve, but I'd like to know if such a plugin exists....
This is what im looking for,
A web page which takes a mysql table structure and accepts user conditions for a select.
For example, if a table consists of age,location, name and email, is there a plugin which once set up shows a page where a user can enter conditions for any of/ some the columns he wants and then run a search which displays the records fromt eh mysql database...
conditions like age between or age>
location in ('..','...')
etc etc...
basically a simple script to search for a bunch of records based on the users conditions
I don'y know if i understood you correctly and i don't know if this is what you are looking for exactly but this might do.
http://www.scriptiny.com/2009/03/table-sorter/
I use phpMyAdmin - you can browse your tables, insert data, run open-ended queries or use a search form to fill in what you're looking for. Plus loads more. It's excellent, free and (I believe) open source.
http://www.phpmyadmin.net/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Here's what I need: I have a table in a SQLite file, that contains items - descriptions, dimensions, image and thumbnail.
I need to allow someone from outside the company to edit this table through an "admin interface". I need a simple login mechanism to authenticate said user, and I need a form that shows all available rows in the table applicable to him/her, and allow editing the values. That may include uploading images.
Now, I've developed tons of these interfaces before, in several languages. What I'd like to ask is: is there a shortcut? Since this needs to be quick and dirty (i.e., this wasn't in the original plan, I'm not being paid for this, but I may lose a client if I don't have it in place) and be up as soon as possible, is there some open source solution, or any previous PHP code, that I can customize and use in this and future cases?
Any solution that will save me time is welcome.
Thanks for YOUR time :)
Guy
Well if you can use a framework you could use an auto generated admin interface or scaffolding from a framework. Symfony and Cake both have this. Of course thats a lot of dead weight to have if the whole app/site isnt using the framework. But it would make it relatively painless to create. IF you can run this interface on a subdomain that would make it even esier since you dont have to worry about integrating it with anything existing except the DB and shared folder for the uploaded files.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I've seen lots of examples of bulk uploading CSV files to MySQL. However, I have the need to utilize an Excel file, and don't want to trouble the user with saving as CSV. Can anyone provide links to PHP routines they use that will read large Excel files, match the column names to database table columns and upload large (>5k records) efficiently?
Thanks much!
You'd need to use something like PHPExcel to read/parse the Excel files. As for mapping columns to tables, that depends entirely on if the user actually bothers to put column headers into the spreadsheet. If they don't, then you'll just have to guess and it'll undoubtedly NOT work out nicely.
Allowing arbitarirly formatted spreadsheets anywhere near a database makes me cry...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Nukewarz
What would you think needs to be added to improve this site (design wise).
There has been a lot of work put into it and now im really wanting it to be semi perfect.
Any recommendations for a nice simple php forum seeing as i already have a users database.
Are you looking for ready made php forum? I may suggest MyBB which is really simple to manage and edit and it's quite extensible. Or you could try phpBB, which is tougher in personalization but very solid and powerful. If I dint' get the 'question' wrong..
I think you may have forgotten to post the link?
Regarding the forums, what format is your users database already in. For example, do you have some sort of CMS functionality where you have captured user's data, do you have an Excel spreadsheet, Facebook fan page etc.? In other words, how is your user data currently stored?
EDIT - sorry, this was too long to go in the comment field
Data is stored in a mysql database when a user register
So it's some sort of custom form which captures the user info into a database? If you have less than a couple of thousand users and you only need to do this once, probably the easiest thing to do would be to export your users out from the database into a CSV file - see How to output MySQL query results in CSV format? or just use PHPMyAdmin depending on your level of file access.
Many open-source forum softwares (e.g. PHPBB and Phorum) have the ability to import a CSV file, so all you'd have to do then is get a template for your import CSV file, and copy your user data with the correct formatting into this. MyBB (mentioned by Damien) seems fine, and already has some merge functionality - see http://www.mybb.com/downloads/merge-system - I'm not sure if this would suit you though since you haven't identified an existing software (i.e. you might need to write a custom importer).
One trick I have learned is to create a user in any given database driven software (e.g. PHPBB), and export the appropriate user table to CSV using the technique I just mentioned (or using the built in functions in PHPMyAdmin). You can then use this as the template, and then read the data back ito the database, see Import CSV to MySQL . This can be a hit-and-miss technique depending on how many dependant tables there are for the user table.