PHP And Dreamweaver?
Hey there!
Google doesn't really help me, not any other php tutorials or whatever, so I am asking here.
I want to add opening hours to my companies web page. So far so good, worked on a php script and took a few examples from GitHub.
I got a working php script saying if we are in the office or not.
Now how do I put that in my Contact div? Or how do I implement it in the website?
This is my php code that I used:
!
<?php
date_default_timezone_set('Europe/Vienna');
$weekday = date("H:i");
if ($weekday == "Friday") {
$open_from = "08:30";
$opten_to = "15:00";
}
elseif ($weekday == "Saturday" || $weekday == "Sunday") {
$open_from = "00:00";
$open_to = "00:01";
}
else {
$open_from = "08:30";
$open_to = "17:00";
}
if (date("H:i") < $open_from || date("H:i") > $open_to ) {
print "nur via E-Mail erreichbar, wir leben ja nicht im Büro :-)";
}
else {
print "Sie können uns jetzt anrufen, wir sind erreichbar :-)";
}
?>
