Create, send, and read text from a file.
I'll try to break this down as much as I can.
I want to create a website where the user answer a few questions, which gets saved to a textfile(not necessary a textfile, could be any file), for example:
Question: What time is it?
Answer: It's 6 pm.
How it would look inside the textfile:
What time is it?
Also, I want the user to be able to upload an image when answering a question, for example:
Question: Could you take a photo of your clock?
Answer: *uploads picture*.
How it would show up in the text file:
Could you take a photo of your clock?
Also, I want this to be saved to a file which can beaccessed later by an admin(for example), the admin would then be able to correct the answer, and send it back to the user.
Here's an example:
User login to his page(login function done), gets two options: "answer question" and "see corrected answers". When user chose the "answer question" option, he gets redirected to a page where he answers a few questions, the questions gets saved to a textfile, which the admin then will be able to see when logging in to his page and chosing "see questions answered by user". The admin select the option, reads the answers, correct them, and then sends them back to the user, who will be able to view them by choosing "see corrected answers".
Really grateful if anyone could help me with this!
Who is your webhost?
How much experience do you have with PHP, MySQL, JQuery, etc.
May I ask why a text file, and not a database?
I'm curious because a text-file would be highly limited. You would have to submit lines of code into the text file so it could be pulled out and viewed on the web. For example you would have to upload the picture then send the code to either display the picture, or the url to the picture in the text file.
It might work, but would be especially limited when designing the physical look of your site.
Databases are much more secure. You never really want to have info stored in plain text where people can access it.
DBs are very easy to utilize.
If you look up
That would demonstrate how to do it all in one tutorial.
Start a new thread for your question, and be specific on what you need help with.
how i can start ea new thread?
I moved the post in question to a new thread.
Bonzai - To create a new thread here in the PHP forum, just click on the PHP link at the top of the page where it says CodingForums.com > Server Side Development > PHP. From there, click the New Thread link.
We now return you to your regularly scheduled discussion. ;)
|All times are GMT +1. The time now is 01:12 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.