473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

How to Import a Flat Text File Into an HTML Table?

I have an HTML form with a pre-built table containing "standard"
column headings (for example, First Name, Last Name, SSN, Hours,
etc.). I want a user to be able to enter values into the form and then
submit it. The data will be emailed to an administrator who will then
print the month's report. I also plan to extract the data and store it
in an external flat text file so that there is an electronic backup
version.

The user would complete this form monthly, but may have reason to view
a prior month's form. So I'd like to offer an Import button on the
form that, when clicked, would retrieve the flat text file data and
display it in the pre-built table (obviously I'd have to provide some
mechanism for the user to identify which month's file they want to
view as well). Anyone aware of examples of this or have any ideas on
how to implement this?

Seems like there would have to be a way to extract the data from the
form, then write it to a file (using tab or pipe delimiters to
separate the columns), as well as a way to search for a particular
month's file, then read that file and display the data in the HTML
form (with the first name data in the First Name column, the last name
data in the Last Name column, etc.). Sounds do-able, but I'm not sure
how.

TIA,
Yellowbird
Jul 20 '05 #1
3 9762
ye*************@hotmail.com (Yellowbird) wrote in
news:63**************************@posting.google.c om:
I have an HTML form with a pre-built table containing "standard"
column headings (for example, First Name, Last Name, SSN, Hours,
etc.). I want a user to be able to enter values into the form and then
submit it. The data will be emailed to an administrator who will then
print the month's report.

<snip>
Learn a scripting language like PHP, Perl, JSP, VBScript or some other.
With any of these you will be able to implement what you describe above.

--
News Updater, No scripts, No Database
http://www.xmlssoftware.com/NUpdater
Jul 20 '05 #2
ye*************@hotmail.com (Yellowbird) writes:
[snip] print the month's report. I also plan to extract the data and
store it in an external flat text file so that there is an
electronic backup version.


stop yourself right here and consider tieing a relational database (a
very simple one maybe) to this application.

failing this, you need to learn script coding and cgi programming to
get the dynamism that you're describing.

HTH
--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) Unix Administrator/Consultant
305 321-1144 (mobile http://www.JerrySievers.com/
Jul 20 '05 #3
A relational database may be overkill. A flat file or a hash might just
as well do the job.

I have a pair of perl scripts which might be useful to learn from. One
appends form data to a file, the other sends it as a mail. They are too
long to post here (129 and 298 lines respectively) But you can do the
same in nearly any scripting language and your host/ISP may already
offer this capability.

If you chose the mail option, you do have to make sure about who you are
sending mail to and/or who your are receiving it from or else you will
end up as an HTTP-spam gateway.

If you choose the file option, be sure to use file locking on the off
chance that more than one user will submit a form at the exact same time.

For both, validate and otherwise make safe your data.

-Lars

Jerry Sievers wrote:
ye*************@hotmail.com (Yellowbird) writes:
[snip] print the month's report. I also plan to extract the data and
store it in an external flat text file so that there is an
electronic backup version.

stop yourself right here and consider tieing a relational database (a
very simple one maybe) to this application.

failing this, you need to learn script coding and cgi programming to
get the dynamism that you're describing.

HTH

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TeleTech | last post by:
Hi. Please try to bear with this SQL "newbie" here ;) I am trying to figure out how to import the FCC ULS report results into a database. I believe what I need is a JOIN statement. To see...
1
by: Larry Rekow | last post by:
I have a report that's created each day as a flat textfile. Because I came from the Access world, I created a macro that imports it with a schema that gives meaningful names to the various...
1
by: Dan | last post by:
Could someone please help me with auto importing a series of data files into an Access table. I tried to follow code given below in a previous messagebut i'm getting error messages. Here's my...
3
by: Frank Reichenbacher | last post by:
I've been developing an Access database for our small office for several years now so I am not a newbie. However, I have a need for which I am not finding a mechanism to accomplish in the material...
3
by: deko | last post by:
I've been trying to use the Access Import Wizard to expedite importing data into my mdb. The nice thing about the wizard is that I can import from different file formats - txt, xls, even Outlook -...
0
by: NewbieSupreme | last post by:
I'm using PHPMyAdmin on an Apache2Triad install (latest version; 5.x.x, which installs PHP5 and PHPMyAdmin 2.8 as well). In Access, I exported a table to a text file, tab-delimited, text qualifyer...
1
by: NathanB | last post by:
Hi there, I have a text file (flat file) which I would like to import on a regular basis into Access. The text file contains 2 record types, header (prefixed with RHD) and detail (prefixed with...
8
by: =?Utf-8?B?Ym9iYnk=?= | last post by:
Could you please help me in this project. I have aTab delemeted file. It has 20 columns and some data. I have to import this data into SQL Server. I am using sql express edition. I am using...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.