I have a page that when the user clicks on a horse to see more info on that horse (referred by ID number in mysql table), it only returns the first record, NOT the one you chose. The page is http://www.cbarlranch.com/?pg=forsale
<?php require_once('dbaseinfo.php'); ?>
<?php
//set variables
$colname_rsStallion = "1";
if (isset($HTTP_GET_VARS['ID'])) {
$colname_rsStallion = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['ID'] : addslashes($HTTP_GET_VARS['ID']);}
//select database
mysql_select_db($db, $conn);
//build the query
$query_rsStallion =
sprintf("SELECT * FROM table WHERE ID = '%s'", $colname_rsStallion);
//set more variables
$rsStallion = mysql_query($query_rsStallion, $conn) or die(mysql_error());
$row_rsStallion = mysql_fetch_assoc($rsStallion);
$totalRows_rsStallion = mysql_num_rows($rsStallion);
?>
Please help. Thanks!