1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php require("configure.php"); ?> <? $calendarId = $_POST["calendarId"]; /*$calDay = $_POST["calDay"]; $calMonth = $_POST["calMonth"]; $calYear = $_POST["calYear"];*/ $datefr = $_POST["datefr"]; $dateto = $_POST["dateto"]; $categoryId = $_POST["categoryId"];
$calTitle = $_POST["calTitle"]; $calDesc = $_POST["calDesc"]; $calDesc = str_replace("'", """,$calDesc); $calType = $_POST["calType"];
///echo $_FILES['imagefile']['tmp_name']; //echo "<br>"; //echo $_FILES['imagefile']['name'];
$sql = "select max(calendarId) as maxid "; $sql .= "from Calendar"; $result=mysql_query($sql); $row = mysql_fetch_array($result,MYSQL_ASSOC); $calendarId = $row{maxid}+1;
//$newscreationDate = date("Y-m-d"); $sql = "insert into Calendar (calendarId, datefr, dateto, categoryId, calTitle, calDesc, calType) values ('$calendarId', '$datefr', '$dateto', '$categoryId', '$calTitle', '$calDesc', '$calType')"; //echo $sql; mysql_query($sql); mysql_close($dbh);
header("Location: calendarindex.php?msg=Add Successful"); ?>
|