My first thought, was an email->web program. If you have an email box on the site you are working on, and you have a cron job, I was thinking you could have the cron job check the mail box and then up date your page. You just send email to your site, and the cron picks it up out of your box and posts it.
Other than that, I don't know enough about the capabilities of wap browsers and how they'd handle forms to know. Otherwise, why couldn't you just use a really low key stock app to do it?
that's almost certainly the easiest way to do it. you will need to use PHP to save the data from the form into the MySQL database - it's exactly the same procedure as if you were doing it with a web form, except the PHP script needs to output WML instead of HTML.
you can make development and testing a bit easier by using the opera web browser to test submission of the form as opera is WAP enabled.
I will first install a working NEWS board then i need some help to make a small input page for WAP
So i be back....
I understand that i need a php page generating wml and connecting to mySQL. That is the help i need, to create a small testpage.
Have to do more testing in the morning, maybe i solve it myself.
i get the inputfiels but when i press send nothing happens
<?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", "password");
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>
keep it as simple as possible - keep the WML and the PHP separate. write a WML form which submits to a PHP script. the PHP script will save the data to the database exactly the same as if it had been submitted from a web page. the PHP script will then output a simple WML page saying "Done".
it might help to write an HTML page to submit to the php script first, just to make sure your php script is saving data normally.
the first page i get to work is this:
<?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="News" title="Newsinput">
<p>Newsinput
<br/>
Name:<br/>
<input type="text" name="poster"/>
<br/>
Heading:<input type="text" name="heading"/>
<br/>
Text:<input type="text" name="text"/>
<br/><anchor title="post">post
<go href="result.php" method="post">
<postfield name="poster" value="$(poster)"/>
<postfield name="heading" value="$(heading)"/>
<postfield name="text" value="$(text)"/>
</go>
</anchor>
</p>
</card>
</wml>
And the resultpage look like this:
<?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="News2" title="News">
<?php
$db = mysql_connect("localhost", "myggans", "123456");
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>