|
Posted by Lag on 02/27/06 05:00
<?php
/*---CONNECT TO DATABASE---*/
$conn = mysql_connect("localhost", "******", "******") or
die(mysql_error());
mysql_select_db("******",$conn) or die(mysql_error());
$event = $_GET["id"];
$title=$_POST['title'];
$date=$_POST['datetime'];
$desc=$_POST['desc'];
//---UPDATE ENTRY IN DATABASE---
$result = mysql_query("SELECT * FROM calendar_events WHERE
id='.$event'",$conn);
$count = mysql_num_rows($result);
$query = "UPDATE calendar_events SET event_title = '" . $title . "',
event_start = '" . $date . "', event_shortdesc = '".$desc."' WHERE id =
$event";
mysql_query($query) or die(mysql_error());
//LIST ITEMS
echo "$event $title $date $desc";
echo "<br>Record Updated! Rows Affected: $count";
mysql_close();
?>
Navigation:
[Reply to this message]
|