Click here to Skip to main content
12,503,321 members (60,228 online)
Rate this:
Please Sign up or sign in to vote.
See more: Javascript PHP Ajax MySQL
I am trying to populate a listbox with different buttons. The first one works fine, when I click on it the listbox populates. The problem is the other four options. I need to change the MySQL query to reflect the button so that the listbox populates proerly.

$dbc = mysql_connect('*','*','*') 
     or die('Error connecting to MySQL server.'); 
$result = mysql_query("select * from tblRestaurants order by RestName ASC"); 
while ($nt= mysql_fetch_assoc($result))
    $arrData[] = $nt;
    echo json_encode($arrData);
Posted 11-Jan-13 10:44am
Updated 12-Jan-13 4:59am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 12 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100