Menu

📰
0

Reddit - Please wait for verification

mysql reddit·/u/Illustrious_Squash99·3 days ago
#poUtalqq
Reading 0:00
15s threshold

connect_error) { die("Connection failed: " . $conn->connect_error); } $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $serial = $_POST["serial"]; $book = $_POST["book"]; $name = $_POST["name"]; $email = $_POST["email"]; $phone = $_POST["phone"]; $check = $conn->prepare("SELECT * FROM books WHERE serial_number = ?"); $check->bind_param("i", $serial); $check->execute(); $result = $check->get_result(); if ($result->num_rows > 0) { $message = " This book is already borrowed. "; } else { $stmt = $conn->prepare("INSERT INTO books (serial_number, book_name, borrower_name, borrower_email, borrower_phone) VALUES (?, ?, ?, ?, ?)"); $stmt->bind_param("issss", $serial, $book, $name, $email, $phone); $stmt->execute(); $message = " Book added successfully.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More