Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,939 members, 7,956,549 topics. Date: Monday, 23 September 2024 at 01:47 PM |
Nairaland Forum / Science/Technology / Programming / Php Wahala (545 Views)
Wordpress Wahala Please Help / Php Wahala / Html And Css Wahala (2) (3) (4)
Php Wahala by dodoisk(m): 5:20pm On Mar 14, 2021 |
I am developing a results checker. How do I set an expiring date for a scratch card when a student first used it in PHP. Like weac scratch card |
Re: Php Wahala by stanliwise(m): 5:36pm On Mar 14, 2021 |
dodoisk:DateTime |
Re: Php Wahala by Karleb(m): 5:37pm On Mar 14, 2021 |
If you can host the code you have on github, I can fix the issue and send you a working code. For free! |
Re: Php Wahala by Jas80: 5:37pm On Mar 14, 2021 |
dodoisk: use ur date function. as in one of the ways to do this is having an expiring date column for the pin on ur database. on every process to check a result, first check the current date, fetch the expiring date from d database, use an if-statement to check if d pin has expired or not. there are several ways to do this. |
Re: Php Wahala by dragnet: 6:20pm On Mar 15, 2021 |
Jas80: This is correct but you missed out a step where the expiry date has to be initially set, On the first use of the card, - check if the expiry date is set in the database, if No, - check the current date then add the duration of expiry to it and save the new date in an expiry date column in the database, thereafter you can follow the steps stated above on every process to check result. |
Re: Php Wahala by faithfull18(f): 10:02pm On Mar 15, 2021 |
dragnet:Hi, kindly check your mail. |
Re: Php Wahala by NobleEugene5(m): 9:39pm On Mar 17, 2021 |
Try something like $expirationDate = Time(Date("d",strtotime("+2 days" ))); That should return the Unix timestamp of 2 days later which you can add to the database on first use after testing if it equates the current Unix timestamp. I've not tested that line of code but it should work. cheers |
Re: Php Wahala by faithfull18(f): 10:25am On Mar 19, 2021 |
dragnet:Hi, kindly check your mail.. |
Re: Php Wahala by faithfull18(f): 2:26pm On Mar 25, 2021 |
dragnet:Hi, kindly check your mail. |
(1) (Reply)
I Need Help With This React Code. / Why You Should Learn Javascript In 2022? / How I Earned Bountifully Enough As A Broke Self Learned Developer (Short Story)
(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. 15 |