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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.