How I insert a .txt or csv file to a web page that will update automatically?
How I insert a .txt or csv file to a web page that will update automatically? I am using Dreamweaver CC and the client will be updating the .csv or .txt file. The client will be updating the .txt or csv file and uploading it. I want the new data to automatically refresh in the page.
Web ApplicationsWeb Development
Last Comment
Jason C. Levine
8/22/2022 - Mon
Jason C. Levine
You need to use some form of scripting that will parse the file on page load and output the results. What exactly is this going to do?
It is going to upload inventory for a small car dealership? Do you have a recommendation for type of scripting?
mankowitz
This is more complicated than you think. You have to set up some kind of presentation for the uploaded file. The simplest thing to do is have the client upload a text file and you could render it as html or as text. For example, if you host supports php, you could have a file like this:
index.php
--------------
<h1> Welcome to the car dealership </h1>
Here is our current offerings:
<pre><?php include("text.txt"); ?></pre>
Thanks for using our site!
It is going to upload inventory for a small car dealership? Do you have a recommendation for type of scripting?
You're actually taking the wrong approach. You need to start looking into moving away from simple HTML page display and into creating a database-driven display and then give the client the ability to update the database with the inventory CSV via import.
Dreamweaver can actually assist you with a great deal of this but the following has to happen:
1) Your hosting plan needs to support both a server-side scripting language (e.g. PHP) and database (e.g. MySQL). Most do, but you need to check
2) Someone needs to know basic principles behind creating database-driven content, especially how to create Master-Child displays
3) Someone needs to know how to configure Dreamweaver to access the database and how to make it do recordsets, repeating regions, and dynamic links
4) Someone will need to train the client on how to import data to the MySQL database.