This work is licensed under a Creative Commons |
The Hypertext Markup Language (HTML) and its ability to present forms has driven the first wave of Web-based services, which mostly provided Web forms for submitting data to some process being driven by such a Web-based front-end. The Extensible Markup Language (XML) then introduced the ability to represent application-defined data structures. XML is the most important foundation of almost all technologies in the Web and Web Service technology areas.
<form action="http://stevex.net/dump.php" method="POST" enctype="multipart/form-data"><table> <tr><td>Text:</td><td><input type="text" name="text" value="text input"/></td></tr> <tr><td>Password:</td><td><input type="password" name="password" value="hidden text"/></td></tr> <tr><td>Checkbox:</td><td><input type="checkbox" name="check" value="1"/> <input type="checkbox" name="check" value="2"/> <input type="checkbox" name="check" value="3"/></td></tr> <tr><td>Radio Button:</td><td><input type="radio" name="radio" value="1"/> <input type="radio" name="radio" value="2"/> <input type="radio" name="radio" value="3"/></td></tr> <tr><td>Submit:</td><td><input name="submit" type="submit"/></td></tr> <tr><td>File Upload:</td><td><input name="file" type="file"/></td></tr> <tr><td>Text Areas:</td><td><textarea name="textarea" rows="2" cols="20"/></td></tr> <tr><td>Selection:</td><td><select name="select"><option selected="selected">XML</option><option>SGML</option></select></td></tr> <tr><td>Multiple Selection:</td><td><select name="mselect" multiple="multiple"><option>242</option><option>290-3</option><option>290-13</option></select> </table></form>
POST
)GET
is good!GET
when implementing a formGET
encodes the values in the URIPOST
request method can upload dataPOST
sends a request containing an entityPOST
is used if the form specifies itapplication/x-www-form-urlencoded
is the default (values in the entity)multipart/form-data
is required for file upload (multipart form data)POST
requestsGET
/POST
transparentlyGET
POST
POST
with multipart/form-data
Query Parameter Test: <?php import_request_variables("gP", "form_"); echo $form_test; ?>
<tr><td>Text:</td><td><input type="text" name="text"/></td></tr> <tr><td>Password:</td><td><input type="password" name="password"/></td></tr>
<tr> <td><label for="textctrl">Text:</label></td> <td><input type="text" name="text" id="textctrl"/></td> </tr> <tr> <td><label for="pwdctrl">Password:</label></td> <td><input type="password" name="password" id="pwdctrl"/></td> </tr>
<fieldset><legend>Billing</legend>billing form controls…</fieldset> <fieldset><legend>Shipping</legend> shipping form controls … </fieldset>
Normal Control | Disabled Control | Readonly Control | |
---|---|---|---|
Text: | |||
Password: | |||
Checkbox: | ! | ||
Radio Button: | ! | ||
File Upload: | ! | ||
Text Areas: | |||
Selection: | [ not supported ] | ||
Multiple Selection: |
dead ends
dead end(from a machine's point of view)
online
understandingis the key term here: application semantics!
SGML on the Web