Pay
Pay
php
include 'config.php';
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "husky_project";
if ($conn->connect_error) {
if (isset($_GET['booking_id'])) {
$booking_id = $_GET['booking_id'];
$result = $conn->query($sql);
$booking = $result->fetch_assoc();
$hotel_id = $booking['hotel_id'];
$user_name = $booking['user_name'];
$user_email = $booking['user_email'];
$paypal_url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
$business_email = "[email protected]";
$return_url = "http://localhost/web/success.php";
$cancel_url = "http://localhost/web/cancel.php";
$notify_url = "http://localhost/web/ipn.php";
</form>';
document.frmPayPal1.submit();
</script>';
} else {
echo "Error: No booking found with ID = $booking_id. SQL Error: " . $conn->error;
} else {
$conn->close();
?>