I'm using a query string that should dictate which image etc is displayed.
I'm using this query in a WHERE statement, comparing it to the primary key of the row to select the relevant information.
BUT, the only thing it brings back is:
Resource id #5
My code is below:
Code: Select all
if (!empty($_REQUEST)) {
$slide = $_REQUEST["slide"];
}
else {
$slide = 1;
}
$img = mysql_query("SELECT img FROM slides WHERE pkey = '$_REQUEST[slide]'");Code: Select all
<?php echo "<img src=\"" . $img . "\" />"; ?>