<?xml version="1.0" ?>
xml declaration so the php should look something like
<?php
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>
<?php /* declare script type short tags may be off other script languages may be available saves debugging later*/
require_once('./common/dblayer1.php');
$query = "select * from login";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) { echo $row[0]; }
?>
</card>
</wml>
<?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>
<?
require_once('./common/dblayer1.php');
$query = "select * from login";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result))
{
echo $row[0];
}
?>
</card>
</wml>
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
<?xml version=\"1.0\" ?>
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1 EN "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card>
<?php
require_once('./common/dblayer1.php');
$query = "select * from login";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) { echo $row[0]; }
?> </card></wml>
maybe
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
try taking out the \ from first line. They don't belong there anymore.
forehead slap moment, Sorry
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
You probably have short open tags enabled in the PHP config. So it would see the xml declaration as an opening PHP tag.
In PHP.ini disable short open tags by finding "short_open_tag" and making the value "0".
You can also seperate the < and ? in <?xml so it doesn't look like a PHP open tag (<?).
eg:
<?php
echo "<"."?xml version=\"1.0\" ?>";
notice that you have "<"."?xml instead of "<?xml.
You can also remove the xml declaration, and use the HTTP content-type header.
<?php
header('Content-Type: text/xml');
digital-ether
Nearly a Posting Virtuoso
1,293 posts since Sep 2005
Reputation Points: 461
Solved Threads: 101