Sorry I missed the while statement. but now I get the error
Fatal error: Call to undefined function: mysql_fetch_obj() in c:\inetpub\wwwroot\lreturns.php on line 30.
I have tried making sure my query produces resulty in a MySQL GUI I have. I do get the results I want but when the PHP runs it dosent work, I dont get it.
Here is my current code
<?
$set = "0";
// set up some variables
// server name
$server = "localhost";
// username
$user1 = "aybabtu";
// password
$pass = "some_pass";
// database to query
$db = "laptop";
// open a connection to the database
$connection = mysql_connect($server, $user1, $pass);
// formulate the SQL query - same as above
$query = "select * from loan where user = '$cdsid'";
// run the query on the database
$result = mysql_db_query($db,$query,$connection);
// NEW CODE (assuming your table has fields called [girs] and [user])
while($obj = mysql_fetch_obj($result)){
echo "Girs Ticket: ".$obj->girs." User Name: ".$obj->user." <BR><BR>";
}
?>
Thanks for the helpd so far paulnaj