I am using a self hosted email marketing service.
I have built the form.... embedded it..
But when someone does not add a value for their birthday.. it defaults to Dec 31, 1969 using a date input.
I want that to be a value of nothing if they did not add their bday as ( mm/dd/yyyy)
The reason why, if i leave it as is.. everyone who doesn't complete the birthday date filed will be getting auto emails saying Happy birthday on Dec 31, 1969.
How can a check to see if its blank in php and then give it a value that wont send out auto emails? Is this even possible?
The
emptyfunction tests if a value is set and not empty, if nothing is set then the user didn't fill it in, so we can set the$empty_bday_flagtotrue, otherwise we set it tofalse.EDIT 1: As gustavo.lei pointed out one has to use
emptyhere rather thanisset.EDIT 2: As Dharman pointed out one can simplify this to
$empty_bday_flag = empty($_POST['birthday']);.