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

Status
Not open for further replies.

DECENNIUM

Established
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
  • 388
    Views
  • 4
    Participants
Last reply from:
LadyClare

Trending Topics

Online now

Members online
1,129
Guests online
1,111
Total visitors
2,240

Forum statistics

Threads
2,287,101
Posts
29,042,393
Members
1,216,370
Latest member
thomasianfcker
Back
Top