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

Trending Topics

Online now

Members online
444
Guests online
2,792
Total visitors
3,236

Forum statistics

Threads
2,332,355
Posts
29,264,218
Members
1,146,235
Latest member
Areeb7
Back
Top