Posted by Jay Blanchard on 12/21/05 15:33
[snip]
> $query=" SELECT title FROM $cat WHERE id='$id'";
[/snip]
echo $query; // does it look right to you?
Alway throw an error when in question
if(!($result = mysql_query($query, $connection))){
echo mysql_error() . "<br>\n";
exit();
}
My bet is that you need to concatenate
$query = "SELECT title FROM " . $cat . " WHERE id = '". $id ."' ";
[Back to original message]
|