Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,198 members, 7,953,729 topics. Date: Friday, 20 September 2024 at 01:28 AM

Php Wahala - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Php Wahala (543 Views)

Wordpress Wahala Please Help / Php Wahala / Html And Css Wahala (2) (3) (4)

(1) (Reply) (Go Down)

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:
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
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:
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

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:


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.

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:

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.
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:

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.
Hi, kindly check your mail..
Re: Php Wahala by faithfull18(f): 2:26pm On Mar 25, 2021
dragnet:

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.
Hi, kindly check your mail.

(1) (Reply)

Get An E-commerce Website For Only N50,000 / Please Help! Would I Be Able To Use Facebook Again??? / 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. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.