Q:

MySql_query insert null not 0

Database: 

DAlanding  int(11) Ja NULL

$DAlanding = $_POST['DAlanding '];

if ($DAlanding =="")
{
    $DAlanding =NULL;
}
$sql = "INSERT INTO cardex (DAlanding) VALUES('$DAlanding')";

But now i need it for a date to:

DAdate  date Ja NULL

$DAdate  = $_POST['DAdate '];

if ($DAdate  =="")
{
    $DAdate  = 'NULL';
}
$sql = "INSERT INTO cardex (DAdate) VALUES('$DAdate')";

A:

Set the datatype as varchar or char.  if we used int its automatically assigned the 0 to corresponding field.