GOOGLE
<?php
include('dbcon.php');
date_default_timezone_set('Asia/Kolkata');
$dates= date('d-m-Y H:i');
$book_id = $_GET['id'];
// eho ("update borrow LEFT JOIN borrowdetails on borrow.borrow_id = borrowdetails.borrow_id set borrow_status='returned',date_return= '".$dates."' where borrow.borrow_id='$id' and borrowdetails.book_id = '$book_id'");
$borrowdetails = mysql_query("UPDATE `one_day_borrow` SET `borrow_status`='returned',`date_return`='".$dates."' WHERE `book_id`='".$book_id."'");
$update = mysql_query("UPDATE `book` SET `book_status`='returned',`one_day`=0 WHERE `book_id`='".$book_id."'") ;
if($_GET['flag']!='Teacher'){
header('location:oneday_borrow.php');
}else{
header('location:teacher_borrow.php');
}
?>
Copyright © 1945 -