Location: PHPKode > scripts > PHP calendar with AJAX driven agenda > MyWeb20Agenda/MyWeb20Agenda/includes/agenda_update.php
<?php 
		$dblogin = 'calendar_conn.php';
		$id = $_REQUEST['updateid'];
		$okay = $_REQUEST['okay'];
		$task = $_REQUEST['task'];
		$lokation = $_REQUEST['lokation'];
		$importance = $_REQUEST['importance'];
		$status = $_REQUEST['status'];
		$year = $_REQUEST['y'];
		$month = $_REQUEST['m'];
		$days = $_REQUEST['d'];		
		$start = $_REQUEST['start'];
		$end = $_REQUEST['end'];
		$todo = $_REQUEST['todo'];
		$dates = $year."-".$month."-".$days;
	
			if($okay == '1')
			{
				$fields = 		"date_id='$id',
							task='$task',
							lokation='$lokation',
							importance='$importance',
							status='$status',
							dates='$dates',
							starttime='$start',
							endtime='$end',
							todo='$todo'";
				$updateid = $id;
				$updfieldid = "date_id";
				$tabname = "agenda";
				$standard = "simple";
				$goodnews = "Data has been changed.";
				$badnews = "Data has not been changed.";	
				require_once 	'../class/agenda.data.class.php';
				$updagenda = new SelectData($dblogin,$fields,$tabname,$data,$selective,$standard,
										$selectid,$selectorder,$goodnews,$badnews,$noquery,
										$message,$deleteid,$insertid,$tbvalues,$days,$updateid,
										$updfieldid,$m,$y);
				echo $updagenda->ChangeTable();
			}
			else
			{
				echo "No valuable data to update!";
			}
 ?>
Return current item: PHP calendar with AJAX driven agenda