Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Adam Chapman
April 22, 2010, 1:40 pm
rate this thread
Im trying to make a website where a user uploads a csv file and then
some computations are done on that data before returning computed data
back to the user.
csv file is already on the server, but I do not want to store all
users' data on my server space.
Forgive me if thias question is daft but I am very new to web
programming (I am experienced in programming, just not for webpages):
Can I upload the csv file with a php form, then convert it to
server? And if so, would multiple users be able to use the webpage
Any help is greatly appreciated
php is serverside
You can certainly take the csv data, convert it using php into a
send it back to the user's browser.
Lots of people can view your webpage at the same time, but if you no
longer have the data on teh server to send to them, how will they be
able to see it?
The csv files will contain some position data, people will upload
their data, then my code will do some processing and display it to
My question about multiple users refers to a case where multiple
people might be using the service at once- would the data get mixed up
on the server? Do I need to temporarily save everyones files under
different names on the server while the processing is taking place and
then delete it afterwards?
April 22, 2010, 2:52 pm
El 22/04/2010 15:40, Adam Chapman escribió/wrote:
Statement by statement:
> Can I upload the csv file
Yes, PHP supports HTTP file uploads:
> with a php form
There's no such thing. You probably mean an HTML form. Yes, HTML
supports controls for file uploads.
> without having to store it permanently on my server
Yes, PHP can remove files:
These are some of the functions you can use:
Whatever, I don't want to discourage you but your question suggests that
you have little or no experience with PHP. While it's not difficult to
learn, you really need to learn the language basic stuff first. Parsing
a third-party file that's subject to having lots of errors is not as
trivial as it appears.
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
If I may rephrase your question:
1. You want to build a web page, that would have something like this:
Browse (this would be a button, that when you click on, it gives you a
dialog box to select the file you want to upload).
Upload and Process (when you click on it, it uploads the file, and
processed it, which presumably means that you want the data to be
stored in a database -- that is, unless you want the data to actually
be stored in arrays, but you did not say what you want done with the
This can be done, using a half dozen or so, HTML code, and a few lines
of PHP code (to process the form).