hehe you can't do it that way.

$query = "INSERT INTO Guests (UserName, Email, Comments, date("Ymd")) Values('$UserName', '$Email', '$Comments', '$Date')";


date("Y-m-d") is a value not the name of the field. so do it like this


$query = "INSERT INTO Guests (UserName, Email, Comments, date)) Values('$UserName', '$Email', '$Comments', 'date("Y-m-d") ')";