ok
Direktori : /home/ngwcolle/www/LIBRARY-NGWC/admin/ajax/ |
Current File : /home/ngwcolle/www/LIBRARY-NGWC/admin/ajax/getlibcardno.php |
<?php // session_start(); error_reporting(0); // include('../includes/config.php'); include('../includes/config.php'); if(isset($_POST["secid"])){ $subid=!empty($_POST['secid'])?$_POST['secid']:''; $admyear_id=!empty($_POST['admyear'])?$_POST['admyear']:''; $resultuser = mysqli_query($con,"SELECT * FROM tbl_students"); // $yy=substr($admyear_id, -2); // $endyear=$admyear_id+3; $rowsuser = mysqli_num_rows($resultuser); $libno="NGWCLC".$subid.substr($admyear_id, -2).str_pad((($rowsuser)+1),4,'0',STR_PAD_LEFT); // $accession = mysqli_query($con,"SELECT * FROM book where booktype='$booktype'"); // $rowacc = mysqli_num_rows($accession); // $accessionno="MDCN".$cat_name.$booktype.str_pad((($rowacc)+1),4,'0',STR_PAD_LEFT); $data1 = array( "libcardno" => $libno //"result" => $count // "accession"=> $accessionno // "fee" => $rowd['cfee'] ); // echo $subid; echo json_encode($data1); } ?>