PHP Mysql problem

Soldato
Joined
6 Jan 2005
Posts
3,633
Location
Cambridge
Hi, I'm having problems with PHP and Mysql

PHP:
$dbname = "***";
$dbpassword = "***";
$dbserver = "localhost";
$db = "***";
mysql_connect($dbserver,$dbname,$dbpassword);
mysql_select_db($db);
$query = mysql_query("SELECT * FROM `$t` WHERE `id`='$id'");
while($output = mysql_fetch_array($query)) {
**do stuff
}

I get this message

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in *** on line 95

I've used mysql_fetch_array() before and its worked

Does anyone know the problem?

Thanks
 
yeah $t and $id are variables, can i use variables with this?

edit: read it wrong sorry, on the link it is URL/page.php?t=php?id=1

maybe this is wrong?
 
Last edited:
Back
Top Bottom