Posting data - Forms vs Tables

F

Fernie

I recently started to create some web based forms for people to submit
information to a database via a cgi and I've done it in two different ways:

1. Creating a form and inserting a table i.e. <form><table> and by
2. Creating a table without using a form.

In both cases, I am able to post data without a problem. The only
difference that I was able to see is that using a form helps me to organize
and keep my labels and fields aligned on the table. Without the form, I
noticed that the first row would get out of alignment.

Anyway, what is the purpose of forms (<form>)? Are there benefits to what
gets posted to the webserver, i.e. only the fields within the form?

Thank you,

Fernie
 
D

David Dorward

Fernie said:
Anyway, what is the purpose of forms (<form>)? Are there benefits to what
gets posted to the webserver, i.e. only the fields within the form?

You shouldn't be able to have successful form controls without a <form>
element. I can only imagine that you have discovered for rather extreme
form of error correction which goes "Submitting a form... no form... lets
assume one is around the entire page... no action attribute... lets assume
its the current URI".

Depending on error correction is a very bad idea. Other (or newer versions
of the same) browsers might try to correct for your mistake in a different
way (or fail entirely).

If you want to submit form data, you must have a <form> element.
 
F

Fernie

Thanks David. I have both IE and Mozilla Firefox and it works fine and I've
noticed no variable accessing problems so far and we have about 6500
internet submissions using a few of my butchered forms. I really appreciate
your response and I'll get that corrected right away.

Best regards,

Fernie
 
M

Michael Fesser

.oO(Fernie)
I recently started to create some web based forms for people to submit
information to a database via a cgi and I've done it in two different ways:

1. Creating a form and inserting a table i.e. <form><table> and by
2. Creating a table without using a form.

In both cases, I am able to post data without a problem.

I would like to see 2) in action. I guess it's either invalid code or
unreliable Javascript. Or both.
Anyway, what is the purpose of forms (<form>)?

To submit data to a webserver, either using GET or POST method.

Micha
 
A

Adrienne Boswell

I recently started to create some web based forms for people to submit
information to a database via a cgi and I've done it in two different
ways:

1. Creating a form and inserting a table i.e. <form><table> and by
2. Creating a table without using a form.

In both cases, I am able to post data without a problem.

As others have noted, you need that Form element.
The only
difference that I was able to see is that using a form helps me to
organize and keep my labels and fields aligned on the table. Without
the form, I noticed that the first row would get out of alignment.

Use CSS to align your forms - here's an example:
http://www.intraproducts.com/beta/requiredform.asp .

That form uses ASP but can easily be ported to another language. Take a
look at the source code and the CSS.
Anyway, what is the purpose of forms (<form>)? Are there benefits to
what gets posted to the webserver, i.e. only the fields within the
form?

You would do well to read this http://www.cs.tut.fi/~jkorpela/forms/
 
F

Fernie

Michael Fesser said:
.oO(Fernie)


I would like to see 2) in action. I guess it's either invalid code or
unreliable Javascript. Or both.


To submit data to a webserver, either using GET or POST method.

Micha

Thanks for your response. Now I'm using forms.

Fernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top