I have the first page working thanks from some help I received
here. But for some reason, I can not get the values posted to the
second card.
First card (index.wml) source:
<?php
// send wml headers
Header("Content-type: text/vnd.wap.wml");
printf("<?xml version=\"1.0\"?>");
printf("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" "
."\"http://www.wapforum.org/DTD/wml_1.1.xml\" >");
printf("<wml>");
?>
<card id="card1" title="Games">
<p>Select Team Name:
<select name="team" title="AMBLGames" size="1">
<?php
// contains db connection info
include "../dbconnect.inc";
mysql_connect($dbhost, $dbuser, $dbpw);
mysql_select_db($dbname);
$result = mysql_query("SELECT id, teamname FROM teams WHERE active = 1 ORDER BY teamname");
if (!$result) {
die('Invalid query: ' . mysql_error());
} else {
while ($row = mysql_fetch_assoc($result)) {
echo '<option value="'.$row['id'].'"';
if ($row['id']=='42'){
echo ' selected="true"';
}
echo ">".$row['teamname']."</option>";
// printf("<option value='".$row['id']."'>".$row['teamname']."</option>");
}
}
mysql_free_result($result);
?>
</select><br>Pwd:
<input name="pwd" title="pwd" type="password" /><br>
<do type="text" label="Go">
<go method="get" href="index2.wml#card2">
<?php
printf("<postfield name=\"team\" value=\"$(team)\" />");
printf("<postfield name=\"pwd\" value=\"$(pwd)\" />");
?>
</go>
</do>
</p>
<?
printf("</card>");
printf("</wml>");
?>
Second card (index2.wml) source:
<?php
// send wml headers
Header("Content-type: text/vnd.wap.wml");
printf("<?xml version=\"1.0\"?>");
printf("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" "
."\"http://www.wapforum.org/DTD/wml_1.1.xml\" >");
printf("<wml>");
printf("<card id=\"card2\" title=\"SelectGame\"><p>");
printf($_GET["team"]);
printf($_GET["pwd"]);
printf("</p>");
printf("</card>");
printf("</wml>");
?>
Getting a blanks screen on the second card, how do I retreive the
values in my second card? Am I passing them correctly from the
first card?