how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value...
the form im working on has a date field called "date" on the form itself. that "date" will get turned into $_SESSION[add][date] on the next page... i want it so if the person filling out the form didnt leave a date (left date field blank) then it should be NULL so the mysql table will insert the current date... so far i have this code: if(empty($_SESSION['add']['date'])){ $_SESSION['add']['date']=NULL//or should it = FALSE?? } //if its already filled do nothing else to it is there a better way to do this than this way?