Basically I want my headline to print as links (which I'm successful doing) using mysql_fetch_array()!
I'd like for a user to hit this link and then see the whole story.
Right now when I'm hitting my link it doesn't do anything but go to the url but I'm seeing Just a list of headline links.
A tutorial or some help would rock!
My Code:
<? //DB CONNECT
if(!isset($cmd))
{
$result = mysql_query("select * from press_release where active = '1' order by id");
echo "<table><tr><td><h3>Please Select A Title</h3></td></tr><tr><td>Title</td><td>Date Posted</td>";
while($r=mysql_fetch_array($result))
{
$title=$r["title"];
$date=$r["date"];
$full_text=$r["full_text"];
$id=$r["id"];
echo "<tr><td>";
echo "<a href='news.php?cmd=show&id=$id'>$title</a>";
echo "</td><td>";
echo "$date";
echo "</td></tr>";
}
echo "</table>";
}
?>
<?
if($_GET["cmd"]=="show" || $_POST["cmd"]=="show")
{
$id = $r["id"];
$title = $r["title"];
$full_text = $r["full_text"];
mysql_query("select * from press_release where id = $id");
echo "<table><tr><td>$title</td></tr>";
echo "<tr><td>$full_text</td></tr>";
echo "</table>";
}
?>