php - Can't $_GET contents of field using quoteid -
i sending myself crazy figuring out issue following code. names within database exact have them here can't seem info quote using $quoteid when type in id static e.g. quoteid = 12 can filter through data. isn't ideal.
<?php $quoteid = $_get["quoteid"]; if ($_get['quoteid']) { $quoteid = $_get["quoteid"]; } $quote = $db->getrow("select * quotes quoteid = $quoteid"); ?>
html
<h1><?php echo $quote->description;?></h1>
any appreciated.
thanks,
melissa
note need put php variables inside single quotes when writing sql queries. in example:
$quote = $db->getrow("select * quotes quoteid = '$quoteid'");
Comments
Post a Comment