Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
It's not possible via simple HTML.
You use a server side programing language, that is embedded into the HTML.
For example, with PHP, you put the code between
and
When a user submit a form, the form is passed the the web server process on the server, along with all arguments of the form.
The web server sees that the target of the form contains this "coding" tags, and launch the PHP interpreters.
The PHP interpreters runs through the code, and execute the described actions with access to the form value.
PHP can generate HTML during that process, that will be included into the HTML sent back to the user that posted the form.
Once the PHP is finished, the web server takes the hand back, and send the HTML (both static and generated by the PHP engine) back to the browser.
For example, take this file (hello.php):
PHP Code:
Hello <?php $user=$_GET['user']; //fetch the user given in the URL if($user==''){ $user="world"; } print $user; ?> !
If you access it without any parameters, it will output
http://something.com/world.php
If you add a "user" parameter, it will use that parameter to adapt the HTML output
http://something.com/world.php?user=wmt
__________________
Only a biker knows why a dog sticks his head out the window.
|