D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
urbane.createerp.com
/
Filename :
item-code-name.php
back
Copy
<?php include 'config.php'; if ( isset( $_POST['c_codeidz'] )) { $c_codeidz = $_POST['c_codeidz']; $sqlmain = "select * from `inventory` WHERE `inventory`.`id` = '$c_codeidz'"; $resultmain = mysqli_query($conn, $sqlmain); $rowcount = mysqli_num_rows( $resultmain ); if (mysqli_num_rows($resultmain) > 0) { while($rowmain = mysqli_fetch_assoc($resultmain)) { $i_name = $rowmain['item_code']; $i_name_id = $rowmain['id']; } } if ( $rowcount ) { $msg['item_code_name']=$i_name; $msg['item_code_name_id']=$i_name_id; $msg['status'] = "true"; $msg['msg'] = "ok"; echo json_encode( $msg ); exit(); } else { $msg['status'] = "false"; $msg['msg'] = "Error on updating."; echo json_encode( $msg ); exit(); } } else { $msg['status'] = "false"; $msg['msg'] = "Error on updating."; } ?>