|
Posted by Geoff Cox on January 23, 2008, 6:48 am
Please log in for more thread options
On Wed, 23 Jan 2008 04:47:01 -0600, Lars Eighner
>> I know how to use a form to send a value typed in by a user but
>
>> 1. how do I print that value on the web page?
>
>> 2. how do I get that value into a data base on the server?
>
>> Thanks for any hints!
>
>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
>with HTML.
>
>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.
Thanks Lars -- the above has cleared my thoughts!
Cheers
Geoff
|