Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

populate select box from database using jquery using -'php,jquery,mysql,populate'

populate select box from database using jquery  using -'php,jquery,mysql,populate'

I am trying to populate a select box from values from a mysql database, using jQuery.

db call:

include 'db.php';
$con = mysql_connect($host,$user,$pass);
$dbs = mysql_select_db($databaseName, $con);

$tableName = "tbl_title";
$result = mysql_query("SELECT * FROM $tableName");

$data = array();
while ( $row = mysql_fetch_row($result) )
    $data[] = $row;
//echo json_encode( $data );    


<select id="a1_title">

There are a bunch of examples that I have found, but nothing specifically related to what I am looking for, unless the force is not with me today.

Is there a link someone can point me to?

asked Sep 8, 2015 by rajesh
0 votes

Related Hot Questions

Government Jobs Opening