<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//include_once '../mysql.php';

//include_once '../functions.php';
$q = $_GET["q"];


 namesearch($q);
function namesearch($m) {
    $dbc=mysqli_connect("localhost","zeqrbruu_kariobangishop","@@karishop@@","zeqrbruu_shop");
     $c = mysqli_query($dbc,("select * from sub_accounts where account='$m' order by name
	 "));
    if (mysqli_num_rows($c)> 0) {
  
										echo '
													 											 <label>Sub Ledger</label>
                                                                     <select name="sub"  title="Client type">
                                                       
                                                            <option></option>
                                                    ';
													
    while ($row = mysqli_fetch_array($c)) {
       $id=$row['id'];
	$name=$row['name'];
        echo "<option value=$id>$name</option>";
    }
    echo '</select>';

    }
}

?>
