[ back to toc ]

How to submit directly onto html?

Date: 2002/02/20 11:54

Hi Peter,

Thanks for the prompt reply! I would like to know if there is a script or
a way that my form instead of posting from the form in real time onto a
.txt file would post it directly in a table in the html page?

Look at this mess http://libertyprofit.netfirms.com/lists.html

It would be nicer without the free hosts banners but you get the idea of
the 3 frames each with their .txt file I put that contain the names of
those who would of just submitted.

Now, there is something about the names not going one under the other and
it has something to do with the format I am saving the file. Still trying
to figure that one out...

It would look much more professional if I could put a table on an html
page and when people would submit, their names would go in a nice layout
page with a table with 3 colums instead of frames.

If I could only update the text file and the html page would update also.
I say that because I have to delete names sometimes from the list as
people fool around. I would need a script to reject bad words people post
instead of their names. But I guess updating the html table would be ok

Do you get the idea Peter of what I am trying to acheive?



What you want to achive will get more and more complex. If you want to
learn the technology how to program web, go ahead and read my answer. If
you are only interested a bit and just want to save money not emloying a
professional to set up a web site that fits your purpose, rethink it
twice. If the second case is true try to estimate the final business needs
you have and if that is real business, then you really will save money
paying a professional.

I am not selling myself, I do not accept such a job.

And now to the technology:

There are two phases in such a task that you want to achieve.

1. Get the data from the web form and store it in some data store. A data
store can be a text file, MySQL, ORACLE and so on. It is even possible to
store the data temporarily in memory.

2. Get the data from the data source and format it for display on client

You can mix the two, but you have to know that they are essentially two
different tasks. The data store has to have a format that allows easy and
programmatical edition of the data (delete, modify records). Thus a plain
text file may fit your needs.

The second task is also performed by a program that reads the data from
the data store (from text file) and formats it into nicely formatted HTML
(or whatever format you need). This can be another CGI program, or the
program that alters the text file may also generate the HTML and place it
among other static HTML files so that the webserver can display it.

In short: store the data in a text file and have another CGI that displays
the data in HTML read from the text file.

I hope this helps.

Thanks Peter, I understand the complexities but going through the net I
found an SSI command <!--#include file="file.txt" --> so I put my
directory link to my text file and there it was! My list was into a cell
in my html document! Goodbye frames!

Were you aware Peter of this? But now I have 1 little problem left if you
go at the page I did http://libertyprofit.netfirms.com/testingoff.shtml ,
the text goes in unwrapped. The result is not like it should. It's all ok
in my .txt file. You can view the source from the document and see. I
uploaded it in ascii but all the names are not formatted like in the .txt
file. My text cells are not wrapped either.

Does it have something to do with a certain <XMS> command?? I been looking
for this for 8 hours not finding the solution.

My old server page at even if it's in
frames like it is, the text is ok in the frame as you can see there. If
the answer is simple than I am a real newbie idiot. And I even tried to
put frames on my side like down there and still the texts were like they
were unwrapped.

What in the world could be wrong Peter? Please help me.



the server side include you mention is web server specific and is not
standard. On many servers this is fully or partially disabled due to
security reasons. On those servers however even CGI is not allowed for the
same reason.

Regarding the cell wrapping: the cells do wrap and for that reason the
numbers may not line up with your names. However this is an HTML design
issue that you may need the consultation of an HTML expert.


Please take your time and rate me at AllExperts.com
I ask you to do that the way you believe I deserve.
This is a feedback that I get from allexperts but
it does not affect my life in any financial way. This
is just a mental feedback.

In case you think my answer was really good and if you feel
it appropriate do not hesitate to nominate me to volunteer
of the month.

I do this job volunteer in my free time and this is all I get
as compensation.

[ back to toc ]