Hi,
For some reason that I can't figure the code below does not work, trying to resbmit the page using the onchange function. I get an error stating 'method or form not supported', finding it impossible to solve this one, need some help if possible, thanks
------------- Code --------------------------------------
<script language = "JavaScript">
function resubmit()
{
document.signup.action="step1.php"
document.signup.submit()
}
</script>
<form name = "signup" id="signup" action= "<?php echo $_SERVER['PHP_SELF'];?>" method="post">
<?php
/********************************************* DROP DOWN FOR SECONDARY EXAM *******************************************/
$ak="3";
echo'<table align="center">';
if(isset($_POST['secondary_exam_id']))
$_SESSION['secondary_exam_id']=$_POST['secondary_exam_id'];
echo'<tr>
<td colspan="2" class="labelcell">
<label for="secondary_exam_id">* Select Curriculum:</label></td>';
echo'<td colspan="2" class="fieldcell2"> <select name="secondary_exam_id" onchange="resubmit()">';
$query_result = mysql_query ('SELECT * FROM secondary_exam_type ORDER BY secondary_exam_id');
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
if($row[0] == $_POST['secondary_exam_id'])
{
$checked = 'selected';
}
else
{
$checked = NULL;
}
echo "<option value=\"$row[0]\" $checked>$row[1]</option>\n";
}
echo'</select></td>';
echo'</tr>';
For some reason that I can't figure the code below does not work, trying to resbmit the page using the onchange function. I get an error stating 'method or form not supported', finding it impossible to solve this one, need some help if possible, thanks
------------- Code --------------------------------------
<script language = "JavaScript">
function resubmit()
{
document.signup.action="step1.php"
document.signup.submit()
}
</script>
<form name = "signup" id="signup" action= "<?php echo $_SERVER['PHP_SELF'];?>" method="post">
<?php
/********************************************* DROP DOWN FOR SECONDARY EXAM *******************************************/
$ak="3";
echo'<table align="center">';
if(isset($_POST['secondary_exam_id']))
$_SESSION['secondary_exam_id']=$_POST['secondary_exam_id'];
echo'<tr>
<td colspan="2" class="labelcell">
<label for="secondary_exam_id">* Select Curriculum:</label></td>';
echo'<td colspan="2" class="fieldcell2"> <select name="secondary_exam_id" onchange="resubmit()">';
$query_result = mysql_query ('SELECT * FROM secondary_exam_type ORDER BY secondary_exam_id');
while ($row = mysql_fetch_array ($query_result, MYSQL_NUM))
{
if($row[0] == $_POST['secondary_exam_id'])
{
$checked = 'selected';
}
else
{
$checked = NULL;
}
echo "<option value=\"$row[0]\" $checked>$row[1]</option>\n";
}
echo'</select></td>';
echo'</tr>';