I recently activated a new website. I set up a form to receive a Student ID and Student Access Code. When I enter the data and click the <submit> button, the invoked PHP program does not receive the values input from the form. The setup is similar to 3 other website that I have developed. This new website is the only one encountering this problem. Here is the setup:
HTML Form
<html>
<body bgcolor="silver" onload="document.StudentLogin.studentid.focus()">
<script type="text/javascript">
function CheckStudentLoginForm()
{
if (document.forms.StudentLogin.elements['studentid'].value.length == 0)
{
alert('Please enter a value for "Student ID" field');
return false;
}
if (document.forms.StudentLogin.elements['studentaccesscode'].value.length == 0)
{
alert('Please enter a value for "Student Access Code" field');
return false;
}
return true;
}
</script>
<font color="black">
<div align="center"><h1>Academic Excellence in Mathematics</h1></div>
<div align="center"><h2>Student Login</h2></div>
</font>
<hr></hr>
<font color="navy">
<form name="StudentLogin" onSubmit="return CheckStudentLoginForm();" action="http://www.countmeingeorgia.org/CMI_Student_Login.php" method="post">
<h3>Enter Student Login Information</h3>
<tr>
<td>Student User ID </td>
<td align="left">
<input type="text" name="studentid" size="30" maxlength="30">
</td>
</tr>
<br><br>
<tr>
<td>Student Access Code </td>
<td align="left">
<input type="text" name="studentaccesscode" size="30" maxlength="30">
</td>
</tr>
<br><br>
<tr>
<td colspan="2" align="center">
<input bgcolor="navy" type="submit" value="Complete Student Login">
</td>
</tr>
</form>
</font>
</html>
PHP Program - CMI_Student_Login
<?php
session_start();
echo("Student ID = $studentid<br>");
echo("Student Access Code = $studentaccesscode<br>");
. . . . . . . . . . .
. . . . . . . . . . . (more PHP logic here, but it depends on the input values)
. . . . . . . . . . .
?>
The values for $studentid and $studentaccesscode are empty. If have a couple of more forms on this website that encounter the exact same problem. So far, no form on this website has successfully passed value into the corresponding PHP program. The other three websites that I have work perfectly. Any ideas of what could be going on with this website? Thanks in advance!!!