#native_company# #native_desc#
#native_cta#

Building WML Sites Page 4

By Andres Baravalle
on February 21, 2001

The next page is called index2.wml
and allows you to decide whether you want to query
the database by subject or by surname.

<?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="card2" title="Kind of research"> 

<p> 

  <?php

echo ("You are checking ");

if ($choice == "exams_data") {

    echo (
" examinations timetables.<br />n");

} else if (
$choice == "consulting_data") {

    echo (
" consulting hours.<br />n");

} else {

    echo (
"I don't know what and there is some problem.<br />n");

}

?> 

</p> 

<p> You can search by surname (either exact or partial)

  or by subject (either exact or partial).<br /> 

  Select the kind of research.</p> 

<p> 

<select name="<?php echo ("$choice");?>" value="surname" title="research"> 

<option value="surname"> professor's name</option> 

<option value="subject"> subject</option> 

<do type="text" label="Go"> 

<go method="get" href="index3.wml#card3"> 

<?php

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

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

?> 

</go> 

</do> 

</p> 

</card> 

</wml> 

 


Again the decision is stored into variable $choice.