Original Post
In developing a calendar in PHP to display a month I need to be able to pass variables, such as ?month=7&year=2004&job=2&location=3 to the PHP script. I currently use:
$currentDate = getdate();
$month = $currentDate['mon'];
$year = $currentDate['year'];
if ($_REQUEST['month']) {
$month = $_REQUEST['month'];
}
if ($_REQUEST['year']) {
$year = $_REQUEST['year'];
}
However, if I do not specify a year or month variable, I get 'undefined index' errors. Is there a means of checking if the $_REQUEST variable exists before I try and read it?