Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,207,650 members, 7,999,851 topics. Date: Monday, 11 November 2024 at 02:37 PM |
Nairaland Forum / Science/Technology / Programming / Problem With Online Booking Application (993 Views)
I'm Having A Problem With This Qbasic. Who Can Help? / Problem With Insert Statement Mysql (2) (3) (4)
Problem With Online Booking Application by ace1(m): 4:53pm On Oct 12, 2015 |
Good Day house, I'm currently building an online hotel booking application in php but I'm having small challenges. This is where the problem is, I want the booking cancelled and the room available for booking if payment isn't made 48hours after the time the booking was made. How do I achieve this? |
Re: Problem With Online Booking Application by fsho(m): 5:47pm On Oct 12, 2015 |
If your app is using Mysql, just create a timestamp variable alongside the booking Information or in a new table. Also create a status variable for (Paid,unpaid) on the same database. Then poll the database for changes. Cheers! |
Re: Problem With Online Booking Application by ace1(m): 6:21pm On Oct 12, 2015 |
fsho: i have a column for status and booking_date already. The Javascript part is what I don't really get. can u please explain further |
Re: Problem With Online Booking Application by mj(m): 4:26pm On Oct 13, 2015 |
ace1: On each Booking create a Timestamp in a column on your database table and Mark the Payment Status as PENDING. Create a Cron Job that runs lets say every 5 mins. The cron script will go to the database table and select records where Payment Status is Pending. The script will now compare the current time and the time on the Timestamp column, if it is more than 48Hours, Booking will be cancelled. 1 Like |
Re: Problem With Online Booking Application by ace1(m): 2:16pm On Oct 14, 2015 |
mj: Thanks you very much. Let me do that |
(1) (Reply)
Help: Background Color Not Showing In Internet Explorer / I Can Help You Write Code's For Just $35. / How To Prevent Uploading Of Adult Images To Your Website Using PHP And Angularjs
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12 |