PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
this is my code: it's a search suggest type feature. I'm using the javascript alert() command to display what this returns. This code here returns quotation marks if it find something in the database, otherwise it returns nothing. i can't get it to display what it really is finding.
if (isset($_GET['search']) && $_GET['search'] != '') {
$search = addslashes($_GET['search']);
$suggest_query = db_query("SELECT distinct payee FROM transactions WHERE payee like '%".$search."%' ORDER BY payee");
while($suggest = db_fetch_array($suggest_query)) {
echo $suggest['suggest'] . "\n";
}
}
My php knowledge is patchy at best.
Any help is greatly appreciated.
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.