
May 31st, 2002, 07:31 AM
|
 |
Contributing User
|
|
Join Date: Feb 2000
Location: Alton,Hampshire,UK
Posts: 40
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
Heyup ! I tried this out on my system, and used the PyWeb emulator to check it. It objected to the <br/> at the end of each option line. The other thing I had problems with was the header, and this has been the case for quite a while now. It seems to be very picky about format and spacing, so in the end I constructed a PHP header which I know include in all my WAP/WML pages. Also, i don't know if it's significant, but I changed single quotes to double quotes.
The code below shows the final result, which seems to work.
Code:
<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<card id="card1" title="Shopping">
<p>
<do type="accept">
<go href="wap.php" method="post">
<postfield name="items" value="$Items"/>
</go>
</do>
Shoppinglist:<br/>
<select name="Items" multiple="true">
<option value="5">Veg</option>
<option value="6">Milk</option>
<option value="7">Thuna fish</option>
<option value="8">Salad</option>
<option value="9">Meat (lots of!)</option>
</select>
</p>
</card>
</wml>
inijoey was right about the WML Apache config - mine looks like this..
Code:
AddType application/x-httpd-php .php .php3 .php4 .htm .html .wml
AddType text/vnd.wap.wmlscript .wmls
AddType image/vnd.wap.wbmp .wbmp
Hope this helps..
PS .. I added a veg option as number 5 .. 
|