integrere php i WML
Jeg vil gerne hente noget ud af min MySQL database vha php i min WML fil. Jeg har lavet scriptet men når jeg prøver at hente den frem på min telefon (Nokia6610) siger den "Ukendt Svar".Koden:
<?php
header("Content-type: text/vnd.wap.wml");
print "<?xml version=\"1.0\"?>\n";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
print "<wml>\n";
print "<card id=\"Nyheder\">\n";
print "<p><select>\n";
$link = mysql_connect("xxx", "xxx", "xxx")
or die("Could not connect to database!");
mysql_select_db("xxx")
or die("Could not select database!");
$query = "SELECT * FROM nyheder order by id DESC LIMIT 0,1";
$result = mysql_query($query,$link)
or die("Query failed:$query");
while($data=mysql_fetch_array($result)){
print "$data[overskrift] $data[tekst]\n";
}
print "</p>\n";
print "</card>\n";
print "</wml>\n";
?>
Nogen der kan se fejlen eller hvad der mangler??