Login | Sign up | Toll-Free: 1-800-752-0455
 
 

Forum

 

4 posts by 2 authors in: Forums > CMS Builder
Last Post: October 30, 2017

Hi All.

I've got the standard form to email code, with the email address stored in CMSB using:

$to = $snippetsRecord['bookings_contact'];

Do you think it's viable to do something like:

if (today is friday afternoon to sunday night) {
$to = $snippetsRecord['bookings_contact_after_hours'];
else
$to = $snippetsRecord['bookings_contact'];

Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au

Hi Tim,

Syntax-wise it should work as long as you haveĀ $snippetsRecord['bookings_contact_after_hours'] defined. Let me know if it's not working or you have questions.

Thanks!

Leo - PHP Programmer (in training)
interactivetools.com

Hey Tim,

There are many ways to achieve it. Here is an example:

if( date('N') >= 5 && strtotime('now') >= strtotime('friday 17:00') )

Let me know if it works.

Thanks!

Leo - PHP Programmer (in training)
interactivetools.com