I'm new to dynamic WML. Found some code to go by... works in a wmlbrowser for Firefox, but the cellphone I'm testing with always comes back with the message - Page Can't Be Displayed.
Code is below... I think it may have something to do with the headers. Any help or corrections are appreciated.
<?
require ('session.php');
header("Content-type: text/vnd.wap.wml");
print "<?xml version=\"1.0\"?>\n";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">\n";
print "<wml>\n";
print "<card id=\"quickresults\">\n";
$qs = $_POST['quicksearch'];
$sql = "SELECT movie_name FROM movies WHERE movie_name REGEXP '$qs+' LIMIT 0,15";
$result = mysql_query($sql) or die("Query failed");
if(mysql_num_rows($result) == 0) {
print "<p>No results found</p>\n";
} else {
print "<p>Movies found are:</p>\n";
}
while ($line = mysql_fetch_assoc($result)) {
print "<p>$line[movie_name]</p>\n";
}
print "<do type=\"prev\" label=\"[<<]\">\n";
print "<prev/>\n";
print "</do>\n";
print "</card>\n";
print "</wml>\n";
?>