Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Evening all,
I'm new to PHP, coming from a Coldfusion background, and am currently creating a very small WML application with PHP. It's a very simple application, but there is one part of the PHP code I'm having trouble with. I'm trying to pass a value of a query through to another page using a URL variable, but just can't seem to get it right.
The code for the entire page is as follows:Code: Select all
<?php header("Content-Type: text/vnd.wap.wml"); echo '<?xml version="1.0"?>'; ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<?php
$Conn = mssql_connect("STUDENT1X","sql0503101","**********") or die("Unable to connect to server");
$Db=mssql_select_db("sql0503101",$Conn);
$result = mssql_query("SELECT TOP 5 title, author, date , blogID FROM blogs ORDER BY date DESC");
?>
<wml>
<card id="index" title="Metanews">
<p align="center"><b>Newest 5 Blogs</b></p>
<?php
while($RS = mssql_fetch_array($result))
{
echo '<p><anchor title="Latest News Stories"><go href="readblogs.php?id=$blogID"/>'.$RS['title'].'</anchor></p>';
echo '<p><small>Author: '.$RS['author'].'</small></p>';
echo '<p><small>Date: '.$RS['date'].'</small></p>';
echo '<p>-----</p>';
}
?>
<p><do type="prev" label="Back"><prev/></do><do type="accept" label="Home"><go href="index.php"/></do></p>
</card>
</wml>Any help would be much apprecaited.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]