I have testing a small function to add a newstext directly from my Wap phone, in ordinary php/html it works but not in wml format.
Maybe i need a second card to view my input,
But i need some tips........
here is the code i test with:
<?php
// send wml headers
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="News" title="Newsinput">
<p>Newsinput
<br/>
<input emptyok="true" name="poster" title="Name: " type="text" value=""/><br/>
<input emptyok="true" name="heading" title="Header: " type="text" value=""/><br/>
<input emptyok="true" name="text" title="text: " type="text" value=""/><br/>
<a href="<?php echo $PHP_SELF;?>">Send!</a><br/>
</p>
<?php
$db = mysql_connect("localhost", "myggans", "12345");
mysql_select_db("myggans_3",$db);
$sql="INSERT INTO news_data VALUES('','en','','$text','$heading','$poster','','0','1','','1')";
$result=mysql_query($sql,$db);
if ((isset($heading)) AND (isset($text))) {
echo "Done!<br>";
echo "Details:<br>";
echo "Header: $heading<br>text: $text";
}
?>
</card>
</wml>