error_reporting(E_ERROR); session_start(); include("config.php"); // IF YOU CAN SEE THIS YOU ARE EITHER RUNNING ON YOUR LOCAL MACHINE - WHICH IS OK // OR PHP IS NOT RUNNING ON YOUR WEBSERVER. IF ON YOUR LOCAL MACHINE DON'T WORRY // AS YOUR LOCAL MACHINE PROBABLY DOESN'T HAVE PHP INSTALLED. IF THIS IS RUNNING // ON YOUR WEB SERVER THEN YOU NEED TO GET PHP INSTALLED if (!isset($_SESSION['qmonth'])) { $_SESSION['qmonth']='set'; $date_array = getdate(); // need to assign these early on if (isset($_GET['mm'])) { $_SESSION['mm']=$_GET['mm']; } else { $_SESSION['mm']=$date_array['mon']; } if (isset($_GET['dd'])) { $_SESSION['dd']=$_GET['dd']; } else { $_SESSION['dd']=$date_array['mday']; } if (isset($_GET['yy'])) { $_SESSION['yy']=$_GET['yy']; } else { $_SESSION['yy']=$date_array['year']; } } if ($usepasswords=="false") { header("Location: calendarform.php"); exit; } $message = ""; if (!isset($_POST['passwd'])) { $message = "Add a new calendar event"; } elseif (($_POST['passwd'] == $masterpw) or ($_POST['passwd'] == $previewpw)) { $_SESSION['pass'] = $_POST['passwd']; header("Location: calendarform.php"); exit; } else { $message = "Invalid password - try again"; } ?>
" . $compname . "
" ?> echo $message ?>