this is the error message which i get :
Notice: Undefined index: ddate in c:\program files\apache group\apache\htdocs\try.php on line 22

Notice: Undefined index: dtime in c:\program files\apache group\apache\htdocs\try.php on line 23
Error, insert query failed

the 2 errors on line 22 and 23 is :
$ddate = $_POST['ddate'];
$dtime = $_POST['dtime'];

this is my code:

$title = $_POST['title'];
$description = $_POST['description'];
$ddate = $_POST['ddate'];
$dtime = $_POST['dtime'];
$venue = $_POST['venue'];

$query = "INSERT INTO event (EventTitle, Description, Date, Time, Venue ) VALUES ('$title', '$description', '$ddate', '$dtime', '$venue' )";
mysql_query($query) or die('Error, insert query failed');

$query = "FLUSH PRIVILEGES";
mysql_query($query) or die('Error, insert query failed');

//include 'library/closedb.php';

mysql_close($conn);
echo "New MySQL user added";
}


?>

<form method="post">
<table width="400" border="0" cellspacing="1" cellpadding="2">
<tr>
<td width="100">Event Title</td>
<td><input name="title" type="text" id="title"></td>
</tr>
<tr>
<td width="100">Description</td>
<td><input name="description" type="text" id="description"></td>
</tr>
<tr>
<td width="100">Date</td>
<td><input name="ddate" type="text" id="ddate"></td>
</tr>
<tr>
<td width="100">Time</td>
<td><input name="dtime" type="text" id="dtime"></td>
</tr>
<tr>
<td width="100">Venue</td>
<td><input name="venue" type="text" id="venue"></td>
</tr>
<tr>
<td width="100">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="100">&nbsp;</td>
<td><input name="add" type="submit" id="add" value="Add New User"></td>
</tr>
</table>
</form>

</body>
</html>

can anyone help me to solve this error ? thankss