#native_company# #native_desc#

Building WML Sites Page 5

By Andres Baravalle
on 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.


Header("Content-type: text/vnd.wap.wml");

header("Cache-Control: no-cache, must-revalidate");

header("Pragma: no-cache");

"<?xml version='1.0'?>";



    "http://www.wapforum.org/DTD/wml_1.1.xml" > 


<card id="card3" title="Name"> 


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"> 


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

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