I have a jquery ui datepicker with the weekends blocked off so people can't click them. I know you should never trust the users input and as the box can still be typed in they can still enter weekends. I tried this in php
if(date('w', strtotime($date)) == 6 || 'w', strtotime($date)) == 0)))) {
echo 'Event is on a weekday';
} else {
echo 'Event on a weekend';
}
Essentially, the or ||'s aren't actually being accessed for sundays (0) and it's only actually using saturday as the date.
can someone help?
thanks