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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -