Could someone please tell me what I did wrong?
Here is a script I have started working on.
My web host uses PHP 4.2.2 and MySql 3.23.51
// Database Variables
$server = "localhost";
$database = "tsdbase";
$username = "frank";
$password = "chicken";
$table = "names";
// Connect to Database
$db = mysql_connect($server,$username,$password,$database);
$res = mysql_query("SELECT * FROM $table", $db);
$data = mysql_fetch_array($res);
When I run the script, I get the following error :
"Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource"
What am I doing wrong?
All I want to do is to open a database and display a table to the browser.
Last edited by tvollmer; 08-22-2002 at 10:52 PM..