21.7. At the Server-side
At the server-side, you do what is required by your mobile Internet application using a server-side technology. Commonly used server-side technologies include ASP, Java Servlet, JSP, Perl, PHP, etc.
The contents of the file, processing.asp, are shown below. We will send the registration form of our example to this file whose ASP code will be responsible for doing the processing needed. For the reason of simplicity, we will just display a message saying the registration is successful and list the form data received in the WML card. In real world applications, data in registration forms are very often saved in a database like MySQL, PostgreSQL, Microsoft SQL Server, Oracle Database, etc, at the server-side.
<?xml
version="1.0"?>
<!DOCTYPE wml PUBLIC
"-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<%
Response.ContentType = "text/vnd.wap.wml" %>
<wml>
<card
id="card1" title="Registration
Success">
<p>
The
registration is successful.<br/><br/>
Here
is the data received at the server:<br/>
User
name: <% =Request.QueryString("username")
%><br/>
Password: <%
=Request.QueryString("password") %><br/>
Email:
<% =Request.QueryString("email") %><br/>
Name:
<% =Request.QueryString("name") %><br/>
Birthday:
<% =Request.QueryString("birthday")
%>
</p>
</card>
</wml>
|
|
Previous Page | Page 71 of 71 |
- 1. WMLScript Introduction
- 2. Hello World WMLScript Example
- 3. Compiling WMLScript Code
- 4. WMLScript Language Rules
- 5. Defining WMLScript Functions
- 6. Calling WMLScript Functions
- 7. WMLScript Variables
- 8. WMLScript Data Types
- 9. WMLScript Variables Vs WML Variables
- 10. Passing Arguments to Functions By Value and By Reference
- 11. WMLScript Operators
- 12. WMLScript Conditional Statements
- 13. WMLScript Looping Statements
- 14. WMLScript Standard Libraries Overview
- 15. WMLScript WMLBrowser Standard Library
- 16. WMLScript Dialogs Standard Library
- 17. WMLScript String Standard Library
- 18. WMLScript Float Standard Library
- 19. WMLScript Lang Standard Library
- 20. WMLScript URL Standard Library
- 21. WMLScript Example: Validating Form Data