I have a database with a table called "testtbl" and a field called "UserID". I have entered data in this table (54 rows) but I can't extract and print the data. I don't get any error messages either. Can you tell me what's wrong with my code? mysql_connect(localhost,$username); mysql_select_db($database) or die ("Unable to select the database."); $query = "SELECT UserID FROM testtbl"; $Results = mysql_db_query($database,$query); mysql_close(); print("$Results<br>"); Thanks, Michael
First, your mysql connection does not seem good Second, you cannot print the $Result directly by that way, Try this: