Jump to content

ajax - multiple listbox and text?


sayedsohail

Recommended Posts

Hi everyone,

 

I am using ajax to dispaly a listbox, which works fine.  But i am just wondering how to achieve getting multiple listbox from two different tables at one instance of ajax call.

 

As far i knew it is not possible to send or receive arrays with ajax.  So at the moment i am calling ajax function twice to achieve the goal.

 

Any idea or recommendation is highly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/62104-ajax-multiple-listbox-and-text/
Share on other sites

code:

 

$outdata.="<option value=''> Please choose the Title</option>";  
    while( $dlist = mysql_fetch_array($result) ) 
{
  $outdata .= "<option value='$dlist['id']'>"; 
  $outdata .= $dlist['serial_number']. "-" .$dlist['title']. " </option>";  
}
    $outdata.="</select>"; 

echo $outdata;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.