<?php
include_once("include/db_connection.php");
header("Expires: Thu, 17 May 2001 10:17:17 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
session_start();
if($_SESSION["adminloggedIn"] == FALSE){
header("Location:admin_login.php");
exit;
}
//$uid = $_SESSION['ud'];
$EventId = $_GET['EventId'];
$Description=$_POST['Description'];
$StartDate = $_POST['StartDate'];
$EndDate = $_POST['EndDate'];
$Venue = $_POST['Venue'];
$Judge = $_POST['Judge'];
$PrizeMoney = $_POST['PrizeMoney'];
/*$checkfest = mysql_query("SELECT * FROM fest WHERE `FestName` ='$FestName'");
$fest_exist = mysql_num_rows($checkfest);
if($fest_exist > 0)
{
$messages[1] = "Fest already exists";
header("Location:editFest.php"."?error=fest already exists");
exit();
// unset($f);
} */
$sqlQuery = "UPDATE `events` SET `Description` = '$Description',`StartDate` = '$StartDate',`EndDate` = '$EndDate',`Venue` = '$Venue',
`Judge`= '$Judge',`PrizeMoney`= '$PrizeMoney' WHERE `EventId` = '$EventId'";
$result = mysql_query($sqlQuery) or die("Invalid query: " . mysql_error() . "<br><br>". $sqlQuery);
//header("Location:viewUserProfile.php?username=$UserName");
header("Location:viewevent.php?EventId= $EventId");
//eader("Location:indexApproval.php"); //header("Location:user_viewprof.php");
?>