This is exactly what I need to do. I have a page of news links for my community organization.
I have the page set where visitors can click on the event name and then I want to pass the event number through a URL so that the next page will display the complete event information.
The first part works with this URL:
<a href="contents.php?display_order=$display_order\">
But then on the contents.php page, I'm having trouble getting anything other than the event title to display!
This query displays everything:
<?php
$Host="";
$User = "";
$Password= "";
$DBName="";
$TableName= "news";
$display_order="display_order";
$Link = mysql_connect ($Host, $User, $Password);
$Query = "SELECT * from $TableName where display_order = $display_order";
$Result = mysql_db_query ($DBName, $Query, $Link);
while ($Row = mysql_fetch_array($Result))
{
print ("<H1 align="center">$Row[title]</H1>\n");
print ("$Row[newsStory]\n");
print ("\n");
}
mysql_close($Link);
?>
I know I'm doing something extremely simple and stupid wrong. There's something not right about how I'm using the variable (the event number) that I've passed.
Help, please.