<?php

ini_set('display_errors', '0');
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//ob_start();
//session_start();
error_reporting(E_ALL ^ E_NOTICE);
$q = $_GET["q"];


 namesearch($q);
function namesearch($m) {
   $dbc=mysqli_connect("localhost","u486354202_kgit","GH@@Y98it%9a#@!*&&","u486354202_kone");
   $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>';

    }
}

?>
