Please log in or register. Registered visitors get fewer ads.
Forum index | Previous Thread | Next thread
simple quick question for the IT experts 08:10 - Nov 18 with 703 viewsgordon

If I'm setting up a simple web app that users can enter data & comments on (and there is a chance that the user will use a comma in their comment) & their inputs will be saved to a server, does that mean that it would be daft to use a csv file format to store the user input?
[Post edited 18 Nov 2020 8:11]
0
simple quick question for the IT experts on 08:53 - Nov 18 with 649 viewsSonOfSpock

What options do you have available? Could you save to a database?
0
simple quick question for the IT experts on 09:17 - Nov 18 with 637 viewsDanTheMan

Kinda, but not really. If there is another format you could use that is just as easy and does not have this problem, I'd use that.

Otherwise...

Welcome to the fun world of escaping user input! You wouldn't like to end up like Companies House would you?

https://www.theguardian.com/uk-news/2020/nov/06/companies-house-forces-business-

Anyway, what you'd be looking to do is "escape" the contents of their input, which usually means prepending characters that are known to cause issues (such as commas) with another character so that it can be read later.

The easiest starting point is to wrap all the of the content in double quotation marks. Then you have to deal with quotation marks and line endings, and as I don't know how you're doing this it's hard for me to give you any further concrete advise in regards to line endings and double quotation marks in the string (input).

Poll: FM Parallel Game Week 1 (Fulham) - Available Team

1
simple quick question for the IT experts on 09:49 - Nov 18 with 616 viewsSaleAway

As track and trace people proved, don't use a spreadsheet to store data - use a database... any web server that you have access to should also have the ability to run a simple db system, something like mySQL.

Think about the architecture of your problem right at the start, and design the storage correctly, and it will save you way more time overall, than rushing in with the simplest thing to get you going.

its dead easy later to export a mySQL table as a CSV file if you need to view it via excel for example.

Poll: What will/does your retirement income look like ( including state pension)?
Blog: Phoenix From the Flames

1
simple quick question for the IT experts on 10:04 - Nov 18 with 608 viewsgiant_stow

Oh finally one I could help with!

If you setup a wordpress install and use

contact form 7: https://wordpress.org/plugins/contact-form-7/
and https://wordpress.org/plugins/contact-form-entries/ to store the entries, I'm pretty sure you'd be fine.

Maybe this is besides the point if you're far down another route.

Has anyone ever looked at their own postings for last day or so? Oh my... so sorry. Was Ullaa
Poll: A clasmate tells your son their going to beat him up in the playground after sch

0
simple quick question for the IT experts on 10:18 - Nov 18 with 600 viewsDinDjarin

Can you not use MySql as the backend? Its free and powerful.
0
simple quick question for the IT experts on 16:37 - Nov 18 with 534 viewsgordon

Thanks for replies, it's an R Shiny app and MySQL is do-able yeah. Have already got a CSV file reading and writing numeric data to Amazon S3 but not used to dealing with free text - choice is between switching hosting to MySQL and using structured database or fiddling around to prevent this issue cropping up with the CSV.
0
simple quick question for the IT experts on 16:43 - Nov 18 with 525 viewsDanTheMan

simple quick question for the IT experts on 16:37 - Nov 18 by gordon

Thanks for replies, it's an R Shiny app and MySQL is do-able yeah. Have already got a CSV file reading and writing numeric data to Amazon S3 but not used to dealing with free text - choice is between switching hosting to MySQL and using structured database or fiddling around to prevent this issue cropping up with the CSV.


In that case, write to whatever SQL, dump to CSV when needed.

Poll: FM Parallel Game Week 1 (Fulham) - Available Team

0




About Us Contact Us Terms & Conditions Privacy Cookies Online Safety Advertising
© TWTD 1995-2025