ok thought it was a problem with sessions at first but after doing the session query i know thats not the problem
whats happening its bringing all the results from a row instead of the users results
i have tried many different things still get the same problem
i am sure its somthing to do with the where clause if any one can help me on this please it will be much apritiated
CODE
<?php require_once('Connections/stablemaster.php');
require_once('Connections/general_class.php');
session_start();
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_stablemaster, $stablemaster);
$query_Recordset1 = "SELECT * FROM horse_stats";
$Recordset1 = mysql_query($query_Recordset1, $stablemaster) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Horse summary</title>
<style type="text/css">
<!--
body {
background-color: #6CF;
color: #000;
}
-->
</style>
<link href="Style Sheets/FONTBLUE.css" rel="stylesheet" type="text/css" /></head>
<?php
do {
?>
<table width="900" border="5" cellspacing="5" cellpadding="1">
<tr>
<td width="150" bgcolor="#CCCCCC"><h3 align="center">
<a href="../Horse_history.php?horse=<?php echo $row_horsehistory['name_id']; ?>">
<?php echo $row_Recordset1['name_id']; ?></a></h3></td>
<td nowrap="nowrap" bgcolor="#CCCCCC"><h4 align="center">
Overall Rating</h4></td>
<td nowrap="nowrap" bgcolor="#CCCCCC"><h3 align="center">
<?php echo $row_Recordset1['xp']; ?></h3></td>
<td nowrap="nowrap" bgcolor="#CCCCCC"><h3 align="center">Upcoming Scedule</h3></td>
</tr>
<tr>
<td width="150" height="150" align="center" valign="top"><div align="center">
<img src='../Horse image/<?php echo $row_Recordset1["image"]?>' /></div></td>
<td width="120" valign="top" nowrap="nowrap" class="FONTBLUE">
Age<br />
Gen<br />
Medical:<br />
Physical:<br />
Ran / Won<br />
Career earnings:<br />
Latest race:</td>
<td width="150" valign="top" nowrap="nowrap">
(<?php echo $row_Recordset1['age']; ?>)<br />
<?php echo $row_Recordset1['gen']; ?><br />
<?php echo $row_Recordset1['medical_condition']; ?><br />
<?php echo $row_Recordset1['physical_condition']; ?><br />
(<?php echo $row_Recordset1['ran']; ?>)(
<?php echo $row_Recordset1['won']; ?>)<br />
<?php echo $row_Recordset1['career_earnings']; ?><br />
<?php echo $row_Recordset1['latest_race']; ?><br /></td>
<td width="480" align="left" valign="top" nowrap="nowrap"><h4>Date Time Details</h4>
</h4>
</div></td>
</tr>
</table>
<br />
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
<p> </p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
thats the page that brings the results but bringing everything in from the same row .
i need just the sessions user things to be brought in