Click here to Skip to main content
11,925,292 members (53,290 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 11:44am
Edited 12-Jan-13 5: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
Web01 | 2.8.151126.1 | Last Updated 12 Jan 2013
Copyright © CodeProject, 1999-2015
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