Add Books Books Search Book Update Issue Book Book Submission Book List Student Record Logout

Book Submission


Student Username :
BookId :


query($sql1); $result1 = $conn->query($sql2); if($result->num_rows > 0 && $result1->num_rows > 0) { $row = mysqli_fetch_array($result); $returnDate = $row['returnDate']; date_default_timezone_set('Asia/Calcutta'); if(strtotime($returnDate) <= strtotime(date('Y/m/d'))){ echo "Late Submission
"; } else{ echo "Successfull Submission
"; } $sql = "DELETE FROM borrower WHERE studUsername = '$studUsername' && bookId = '$bookId'"; $conn->query($sql); $row1 = $result1->fetch_assoc(); $quantity = $row1["quantity"]; $quantity = $quantity + 1; $sql3 = "UPDATE bookrecord SET quantity = '$quantity' WHERE bookId = '$bookId'"; $conn->query($sql3); } else { echo "Book not issue
"; } $conn->close(); } } else { echo ''; die(); } } } else{ session_destroy(); $_SESSION = array(); header("location: main.php"); } ?>