I m using an AutoComplete Textbox..!! i want to pass id and value to the next page..!!
here is my code..!!
PHP CODE
$sql1="SELECT * from 0_ledger where group_id not in(1,7) and user_id = $userid";
$result1=mysql_query($sql)or die('Query error:'.''.mysql_errno());
$aUsers = array();
while($row=mysql_fetch_array($result1)) {
$aUsers[$row['ledger_id']] = $row['ledgerName'];
$imp_aUsers = "'".implode("','",$aUsers)."'";
Javascript CODE
var months = new Array(<?=$imp_aUsers; ?>);
$().ready(function() {
for(i=1;i<=iteration;i++)
{
$("#month_"+i).autocomplete(months, {
minChars: 0,
max: 14,
autoFill: true,
mustMatch: true,
matchContains: false,
scrollHeight: 220,
formatItem: function(data, i, total) {
return data[0];
}
})};
i want to pass id to the next page instead of Value..!!
.
.
Help me out..! :)