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

Online now

Members online
997
Guests online
1,385
Total visitors
2,382

Forum statistics

Threads
2,276,208
Posts
28,968,320
Members
1,231,166
Latest member
williamfreede
Back
Top