yes, i need the page, i also need you to echo all of the variables, and add the dump code, please read my entire response, i also asked for a link,
oh, wait, looking at other messages GD and CD are dates.
dates are strings, you can do math like greater than on a string.
you need to convert the date to a number
if (strtotime($gd) > strtotime($cd)) {