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

Trending Topics

Online now

Members online
1,078
Guests online
6,949
Total visitors
8,027

Forum statistics

Threads
2,354,263
Posts
29,382,959
Members
1,079,394
Latest member
vhenz
Back
Top