PHPBuilder - Building WML Sites Page 5



RSS Twitter
Articles Application Architecture

Building WML Sites - Page 5

by: Andres Baravalle
|
February 21, 2001

Now the user must input the data as specified in the next file, index3.wml. We ask the user to insert the name of a subject or the surname of a professor. Look how variables are sent, in this page and in the previous. The syntax is pretty complex, but it lets you handle all the whole process, with only a few files.

<?php

Header
("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
echo 
"<?xml version='1.0'?>";
?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
    "http://www.wapforum.org/DTD/wml_1.1.xml" > 
<wml> 
<card id="card3" title="Name"> 
<?php

echo ("<p>Insert ");

if (${
$choice} == "surname") {
    echo (
"professor's surname (or part of it).<br />\n");
} else if (${
$choice} == "subject") {
    echo (
"the subject (or part of it).<br />\n");
} else {
    echo (
"Maybe there is some problem.<br />\n");
}

echo (
"<input type=\"text\" name=\"${$choice}\" />");

?> 
<do type="text" label="Go"> 
<go method="get" href="query.wml"> 
<?php

echo ("<postfield name=\"$choice\" value=\"$"."$choice"."\"/>");

echo (
"<postfield name=\"${$choice}\" value=\"$"."${$choice}"."\"/>");

?> 
</go> 
</do> 
<p> 
</p> 
</card> 
</wml> 
 

« Previous Page
1
|
2
|
3
|
4
|
5
|
6
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Andres Baravalle

Comment:



Comment:

(Maximum characters: 1200). You have characters left.