Hello All friends
i am tring to use custom php file ,with small script ,but it is not working ,please help
this is the file code
<?php
function fill_unit_select_box()
{
$qp=Conn()->execute("select acc_group from account_type ");
$ROWS = $qp->GetRows();
if (count($ROWS) > 0) {
foreach($ROWS AS $ROW){
$acgroup=$ROW['acc_group'];
$output.='<option value="'.$ROW["acc_group"].'">'.$ROW["acc_group"].'</option>';
}}
return $output;
}
?>
<html>
<head>
</head>
<body>
<form method="post" id="insert_form">
<div class="table-responsive">
<table class="table table-bordered"id="item_table">
<tr>
<th>الحساب</th>
<th>الحساب الفرعي</th>
<th><button type="button"name="add"class="add">
<span class="glyphicon glyphicon-plus"></span></button></th>
</tr>
</table>
<br>
<div align="center">
<input type="submit"name="submit" class="btn btn-info"value="insert">
</div>
</div>
</form>
</body>
</html>
<script>
$(document).ready(function(){
$(document).on('click','.add',function(){
var html='';
html+='<tr>';
html+='<td><input type="text"name="item_name[]"class="form-control item_name />"></td>';
html+='<td><input type="text"name="item_name1[]"class="form-control item_name1 />"></td>';
html+='<select name="accg[]"><optin value"">slect accoungroup</option><?php echo fill_select_unit_box();?></select></td>';
html+='<td><button type="button"name="remove"class="btn btn-danger btn-sm remove"><span class="glyphicon glyphicon-minus"></span></button></td><tr>';
$('#item_table').append(html);
)};
)};
</script>