Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Re: print form value on the web page etc?
- Lars Eighner
January 23, 2008, 10:47 am
rate this thread
This is not an html question.
Essentially, the value of ACTION in the FORM tag should not be an HTML
document, but a script or program of some kind which will retrieve the
values from the server and do stuff with them, such as updating a database
or generating an HTML document based on the values.
What language that script should be in is a function of 1) what the server
is configured to handle and 2) your preference based on what the languages
are good at and your personal taste. When you have choices, the best
language to use is generally the one you know best. Perl, C, shell scripts,
PHP: do any of these ring a bell? There are differences in how the various
languages grab the GET or POST data and how they interface with databases.
For that reason you need to consult the documentation for a language you
want to use.
HTML is not a programming language, so it is impossible to do these things
Perl, C, shell languages, and so forth generally run as CGIs. Since you
generally want some kind of return from a form even if it is nothing more
than "Thanks for the input, have a nice day!" CGIs can and do generate HTML
output, but the CGIs themselves do not look much like HTML. Generally it is
programming language on the outside and HTML in print statements within the
programming language. PHP, on the other hand, usually looks like HTML on the
outside, with various processing instructions embedded.
In any case, the server has to work with the particular language you choose,
which means having appropriate modules installed. Most hosting servers
advertise what they support because it is a selling point.
Lars Eighner <http://larseighner.com/ email@example.com
Countdown: 363 days to go.