Insert in mysql from php saves a date field as 00:00:00 instead of NULL
===

I receive via POST the following variables, sometimes it must be a date and sometimes it must be null (for example if that event has not happened yet)

    $hora_entrada = $_POST['hora_entrada'];
    $salida_comida = $_POST['salida_comida'];
    $regreso_comida = $_POST['regreso_comida'];
    $hora_salida = $_POST['hora_salida'];

so, I assign NULL into the variables if POST is empty:

    if ($hora_entrada == '') {$hora_entrada = "NULL";}
    if ($salida_comida == '') {$salida_comida = "NULL";}
    if ($regreso_comida == '') {$regreso_comida = "NULL";}
    if ($hora_salida == '') {$hora_salida = "NULL";}

now, I want to insert the values into a mysql table:

    UPDATE  `nomina`.`registro_tiempo` SET  
    `hora_entrada` =  '$hora_entrada',
    `salida_comida` =  '$salida_comida',
    `regreso_comida` =  '$regreso_comida',
    `hora_salida` =  '$hora_salida',
    WHERE  `registro_tiempo`.`id_tiempo` ='$id_tiempo';
    ") or die (mysql_error());

the problem is that when the variable is NULL the record says 00:00:00 and I want to keep it NULL

I tried to assign NULL in this two ways without success:

    $variable = NULL;

    $variable = "NULL";

NOTE: The MySql fields have the NULL value as Predetermined.

¿Do you know any other way to do this? I will apreciate your help
