diff --git a/hotel_booking/booking.php b/hotel_booking/booking.php index d2899f6..d901a96 100644 --- a/hotel_booking/booking.php +++ b/hotel_booking/booking.php @@ -192,6 +192,7 @@ alert('error', 'Please login to reserve a room'); } } + diff --git a/hotel_booking/components/header.php b/hotel_booking/components/header.php index 4710662..1586b10 100644 --- a/hotel_booking/components/header.php +++ b/hotel_booking/components/header.php @@ -316,7 +316,12 @@ } else if(this.responseText == 'invalid_pass'){ alert('error', 'Wrong credentials, please try again!'); } else{ - window.location = window.location.pathname; + let fileurl = window.location.href.split('/').pop().split('?').shift(); + if(fileurl == 'booking.php'){ + window.location = window.location.href; + } else{ + window.location = window.location.pathname; + } } }