function addEvent(day, month, year, body) {
if(day && month && year && body) {
// alert('Add Event\nDay: '+day+'\nMonth: '+month+'\nYear: '+year+'\nBody: '+body);
new Ajax.Request('rpc.php', {method: 'post', postBody: 'action=addEvent&m='+month+'&d='+day+'&y='+year+'&body='+body+'', onSuccess: highlightEvent(day)});
$('evtBody').value = '';
} //else {
//alert('There was an unexpected script error.\nPlease ensure that you have not altered parts of it.');
//}
// highlightEvent(day);
} // addEvent.
<textarea id="evtBody" cols="32" rows="5"></textarea>
<br>
<input type="button" value="Add Event" onClick="addEvent($F('evtDay'), $F('evtMonth'), $F('evtYear'), $F('evtBody')); ">
<a href="#" onClick="Element.hide('addEventForm');">Close</a>
$body = htmlspecialchars($_POST['body']);
$timeStamp = mktime(0,0,0, $month, $day, $year);
$bodyF = addslashes(trim($body));
$addEvent = mysql_query("INSERT INTO event (body, timestamp) VALUES ('$body', '$timeStamp')", $conn);