Jump to content

details.php?Cid=1 error


tippy_102

Recommended Posts

My test site was working great until I decided to add a sidebar menu.  :(


My sidebar menu

[code]
mysql_connect("$host", "$username", "$password")or die("cannot connect server ");
mysql_select_db("$db_name")or die("cannot select DB");

$sql="SELECT * FROM games_names WHERE active = 1 ORDER BY gameName ASC";


$result = mysql_query($sql) or die (mysql_error);

while ($row = mysql_fetch_array($result))
{
extract($row);
echo "<h1>$gameName $Cid</h1>";
echo "<a href='details.php?Cid=$Cid'>Details</a></br>";
}

[/code]

My details page

[code]
$query = "SELECT * from games where Cid='$Cid' ORDER BY 'datetime' DESC";
$result = mysql_query($query);
[/code]

My Problem

With the sidebar menu added, the details page always displays the information for the final Cid shown on the menu.

The page url is correct (ie. details.php?Cid=1 ), but the data returned is always for the final Cid.

What have I done wrong?  How do I ensure the correct Cid is passed?
Link to comment
https://forums.phpfreaks.com/topic/23372-detailsphpcid1-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.