🔒 Closed Automatic enable the disabled button at 8:00 am to 5:00 pm

Status
Not open for further replies.

DECENNIUM

Eternal Poster
Help po Pano po gawin to SA PHP po salamat po need Lang po for capstone
"Automatic enable the disabled button at 8:00 am to 5:00 pm"
 
PHP:
// Set Default timezone to Manila
date_default_timezone_set("Asia/Manila");

$currentTime = date("His");

$startTime = 80000;// 8:00AM
$endTime = 170000;// 5:00PM

if ($currentTime>=$startTime && $currentTime <= $endTime) {
  // within time range of 8:00AM to 5:00PM
}else{
  // not within time range of 8:00AM to 5:00PM
}
 
PHP:
// Set Default timezone to Manila
date_default_timezone_set("Asia/Manila");

$currentTime = date("His");

$startTime = 80000;// 8:00AM
$endTime = 170000;// 5:00PM

if ($currentTime>=$startTime && $currentTime <= $endTime) {
  // within time range of 8:00AM to 5:00PM
}else{
  // not within time range of 8:00AM to 5:00PM
}
Thanks lods ,,, 👍 nong nakita ko to na inspired ako mag code 😁 ...

Ibang Lang po yung sa kin...

Every 12 midnight nag rereset yung availability ...
 
Status
Not open for further replies.

About this Thread

  • 6
    Replies
  • 393
    Views
  • 4
    Participants
Last reply from:
LadyClare

Trending Topics

Online now

Members online
624
Guests online
3,841
Total visitors
4,465

Forum statistics

Threads
2,308,607
Posts
29,186,177
Members
1,192,092
Latest member
haydenrbi
Back
Top