At the Server-side

Preferences - Do not show ads

At the server-side, the name specified by the name attribute of <input> and <select> elements can be used to retrieve the data. You can make use of your favorite server-side technology to do the processing required by your WAP application. Common server-side technologies include ASP, Java Servlet, JSP, Perl, and PHP.

In the earlier XHTML MP example, the form data is sent to the processing.asp file, where some ASP (Active Server Page) code will do the processing. Below is the ASP code in the processing.asp file. It just prints out the form data received at the server. In real WAP applications, the server probably needs to do more complicated processing. For example, storing the form data to a database such as MySQL, PostgreSQL, Microsoft SQL Server, Oracle Database, etc.


(processing.asp)

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

<% Response.ContentType = "application/vnd.wap.xhtml+xml" %>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>XHTML MP Tutorial</title>
  </head>

  <body>
    <p>
      Data received at the server:<br/>
      Username: <% =Request.QueryString("username") %><br/>
      Password: <% =Request.QueryString("password") %><br/>
      Gender: <% =Request.QueryString("gender") %><br/>
      Country: <% =Request.QueryString("country") %><br/>
      Which part of our XHTML MP tutorial do you like?
<%
    for i=1 to Request.QueryString("tutorial_part").Count
      Response.Write(Request.QueryString("tutorial_part")(i) & " ")
    next
%>
      <br/>
      temp_id: <% =Request.QueryString("temp_id") %>
    </p>
  </body>
</html>






Sony Ericsson T610





Nokia Mobile Browser 4.0


Previous Page Page 36 of 36

Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?






XHTML MP Tutorial Table of Contents XHTML MP Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page