I have this chronic problem with my php file, though I have made a lot research about the submit buttons and isset and $_POST part of the problem still persist. For you to understand and probably point out my mistakes, i have enclosed the script below:
<?php
$m = (!$m) ? date("m",mktime()) : "$m";
$y = (!$y) ? date("Y",mktime()) : "$y";
if (($_SERVER['REQUEST_METHOD'] == "POST") || ($_SERVER['Submit7'] == "Next"))
{
$eventdate = $_POST['eventdate'];
$stime = $_POST['stime'];
$location = $_POST['locate'];
$mdescription = $_POST['description'];
header('location:next.php');
exit();
}else if (($_SERVER['REQUEST_METHOD'] == "POST") || ($_SERVER['Submit6'] == "Reset"))
{
header('location: myfile.php');
exit();
}
?>
<html>
<table>
<tr>
<!-- calling the function to draw the calendar -->
<td valign="top"><?php cal($_GET['m'],$_GET['y']); ?></td>
<td width="25" nowrap><br /></td>
<td> </td>
<td>
<!-- the second column of the table starts here -->
<!-- -->
<form name="me" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#000000"><tr><td>
<table cellpadding="4" cellspacing="1" border="0 "bgcolor="#FFFFFF">
<tr><td colspan="2" bgcolor="#3399FF"><font size="+1" color="#FFFFFF"><b>Request Form</b></font></td></tr>
<tr><td><b>Date for Event: </b></td><td><input type="text" name="eventdate" value="" size="12"> <font size="2">dd/mm/yyyy</font></td></tr>
<tr>
<td><b>Start Time:</b></td>
<td><input type="text" name="stime"> 24 Hour Format ie.1125 </td>
</tr>
<tr>
<td><b>Location:</b></td>
<td><input type="text" name="locate">20 Characters</td>
</tr>
<tr>
<td><b> Description:</b></td>
<td><textarea name="descrption"></textarea></td>
</tr>
<tr>
<td colspan="2" bgcolor="#3399FF"><div align="center">
<input type="submit" name="Submit6" method="POST" value="Reset">
<input type="submit" method="post" name="Submit7" value="Next">
</td>
</tr>
</table></form>
</table>
</blockquote>
</body>
</html>
<?php>
the problem is with processing the reset and next buttons - I have tried several options and neither solves the problem.