Hi All,

I have a small problem. I want to add time tables for each grade in a school. Therefore in my addTimeTable.php page i have created a form to enter student grade, class and stream. (required only for grade 12 and 13) When a user clicks on "Add" button it should redirect to the page (addTimeTableForm.php) where he should be able to select subjects. But the data was not shown because of some reason. Can anyone help me out regarding this issue??

addTimeTable.php

<form  name="form1" id="form1" method="POST" action="addTimeTableValidation.php">
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("student_management",$con);
?>
<table width="850" border="1" align="center" bgcolor="#00FFFF">
  <tr>
    <td colspan="2" valign="top"><table width="100%" cellpadding="0" cellspacing="0">
      <tr>
        <td width="25%"><img src="../../IMAGE/banner - Copy.jpg" alt="" width="186" height="136" /></td>
        <td width="75%" align="center" valign="middle"><div align="center"><img src="../../IMAGE/banner.jpg" alt="" width="733" height="137" /></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td width="170"> </td>
    <td width="676"><table width="663" border="0">
      <tr>
        <td width="123"><a href="../../Home page/new student registration/add_or_manage.php">Manage Data</a></td>
        <td width="123"> </td>
        <td width="123"> </td>
        <td width="144" align="center"><a href="../../add admin users/changePasword.php">Change Password</a></td>
        <td width="134" align="center"><a href="../../Home page/new student registration/signout.php">Signout</a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="59" valign="top"><ul id="MenuBar1" class="MenuBarVertical">
      <li><a href="../../add admin users/add techer/addAdminUser.php">Add Admin Login</a> </li>
      <li><a href="../../Student registration/new student registration/newStudentRegistrationForm.php">Add Student</a></li>
      <li><a href="../../student attendance/add attendance/addStudentAttendance.php">Add Student Attendance</a> </li>
      <li><a href="../../Student time table/add1 time table/addTimeTable.php">Add Time Table</a></li>
      <li><a href="../../Student marks/add student marks/addStudentMark.php">Add Student Marks</a></li>
      <li><a href="../../manage subject/add subject.php">Add Subject</a></li>
      <li><a href="../../search student information/SearchStudentInformation.php">Search Student Information</a></li>
      <li><a href="../../student payments reports/studentsPayments.php">Student Payment Reports</a></li>
      <li><a href="../../Issue certificate/issueCertificate.php">Issue Certificates</a></li>
    </ul>
      <p> </p>
    <p> </p></td>
    <td valign="top"><table width="659" border="0">
      <tr>
        <td> </td>
        <td colspan="3"> </td>
        <td> </td>
        <td colspan="2"> </td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td colspan="3"> </td>
        <td> </td>
        <td colspan="2"> </td>
        <td> </td>
      </tr>
      <tr>
        <td width="16"> </td>
        <td colspan="3"><h3>
          <label><strong>Add Time Table </strong></label>
          <strong> </strong></h3></td>
        <td> </td>
        <td colspan="2"> </td>
        <td> </td>
        </tr>
      <tr>
        <td colspan="2"> </td>
        <td colspan="2"> </td>
        <td width="91"> </td>
        <td colspan="2"> </td>
        <td width="206"> </td>
      </tr>
      <tr>
        <td> </td>
        <td width="117" align="center"><label>Grade</label>
           </td>
        <td width="69">

          <select name="grade_ID" id="grade_ID" onchange="changefrm()" >

<?php
        $result = mysql_query("SELECT * FROM grade");
        while($row = mysql_fetch_array($result))
        {
            echo "<option value=\"".$row['grade_id']."\"".((isset($_POST['grade_ID']) && $_POST['grade_ID'] == $row['grade_id']) ? ' selected' : FALSE).">".$row['grade']."</option>\n";
        }
        ?>

          </select></td>
        <td width="1" align="center"> </td>
        <td align="center"><label>Class</label> </td>
        <td width="71">
          <select name="class_ID" id="jumpMenu2" >

<?php
        if(isset($_POST['grade_ID']))
        {
            $result = mysql_query("SELECT class_name FROM class where grade_id='".mysql_real_escape_string($_POST['grade_ID'])."'");
            while($row = mysql_fetch_array($result))
            {
                echo "<option value=\"".$row['class_name']."\">".$row['class_name']."</option> \n  ";
            }
            }
        ?>

          </select>
        </td>

        <td width="69" align="center"><label>Stream</label> </td>

        <td><select name="stream_ID" id="jumpMenu3" <?php if(isset($_POST['grade_ID']) && $_POST['grade_ID'] <= 11): echo " disabled"; endif; ?>>
             <option>Maths</option>
           <option>Science</option>
            <option>Commerce</option>
            <option>Art</option>
        </select></td>
      </tr>
      <tr>
        <td colspan="2"> </td>
        <td colspan="2"> </td>
        <td> </td>
        <td colspan="2"> </td>
        <td> </td>
      </tr>
      <tr>
        <td colspan="2"> </td>
        <td colspan="2">

            <input type="button" onclick="changefrm1()" name="button" id="button" value="Add" />

        </td>
        <td> </td>
        <td colspan="2"> </td>
        <td> </td>
      </tr>
    </table>
      <p> </p>
    <p> </p></td>
  </tr>
</table>
</form>

addTimeTableForm.php

<form  name="form1" method="post" action="addTimeTableDatabase.php">
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("student_management",$con);

$grade=isset($_POST["grade"]);
$class=isset($_POST["class"]);
$stream=isset($_POST["stream"]);


?>
<table width="850" border="1" align="center" bgcolor="#00FFFF">
  <tr>
    <td colspan="2"><table width="100%" cellpadding="0" cellspacing="0">
      <tr>
        <td width="25%"><img src="../../IMAGE/banner - Copy.jpg" alt="" width="186" height="136" /></td>
        <td width="75%" align="center" valign="middle"><div align="center"><img src="../../IMAGE/banner.jpg" alt="" width="733" height="137" /></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td width="170"> </td>
    <td width="700"><table width="662" border="0">
      <tr>
        <td width="124"><a href="../../Home page/new student registration/add_or_manage.php">Manage Data</a></td>
        <td width="124"> </td>
        <td width="124"> </td>
        <td width="124" align="center"><a href="../../add admin users/changePasword.php">Change Password</a></td>
        <td width="129" align="center"><a href="../../Home page/new student registration/signout.php">Signout</a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="59" valign="top"><ul id="MenuBar1" class="MenuBarVertical">
      <li><a href="../../add admin users/add techer/addAdminUser.php">Add Admin Login</a> </li>
      <li><a href="../new student registration/newStudentRegistrationForm.php">Add Student</a></li>
      <li><a href="../../student attendance/add attendance/addStudentAttendance.php">Add Student Attendance</a> </li>
      <li><a href="../../Student time table/add1 time table/addTimeTable.php">Add Time Table</a></li>
      <li><a href="../../Student marks/add student marks/addStudentMark.php">Add Student Marks</a></li>
      <li><a href="../../manage subject/add subject.php">Add Subject</a></li>
      <li><a href="../../search student information/SearchStudentInformation.php">Search Student Information</a></li>
      <li><a href="../../student payments reports/studentsPayments.php">Student Payment Reports</a></li>
      <li><a href="../../Issue certificate/issueCertificate.php">Issue Certificates</a></li>
    </ul>
      <p> </p></td>
    <td><label><table width="666" border="0" align="center">
      <tr>
        <td> </td>
        <td colspan="4"> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td colspan="4"><h3>
          <label>Add Time Table </label>
           </h3></td>
        <td> </td>
        <td> </td>
        <td width="47"> </td>
      </tr>
      <tr>
        <td colspan="7"> </td>
        <td> </td>
      </tr>
      <tr>
        <td width="17"> </td>
        <td width="99" align="center"><label>Grade</label> </td>
        <td width="81"><?php echo $grade;?>
        </td>
        <td width="59" align="center"><label>Class</label></td>
        <td width="93"><?php 
  echo $class; ?></td>
        <td width="81" align="center"> Stream</td>
        <td width="155"><?php 

            echo $stream;

        ?></td>
        <td> </td>
      </tr>
      <tr>
        <td colspan="7"> </td>
        <td> </td>
      </tr>
      <tr>
        <td colspan="8"><table width="655" height="529" border="1">
          <tr>
            <td width="13"> </td>
            <td width="125"><label>Time</label> </td>
            <td width="94"><label>Monday</label> </td>
            <td width="94"><label>Tuesday</label> </td>
            <td width="94"><label>Wednesday</label> </td>
            <td width="94"><label>Thursday</label> </td>
            <td width="95"><label>Friday</label> </td>
            </tr>
          <tr>
            <td height="52"><label>1
            </label> </td>
            <td><span id="sprytextfield1">
            <input name="1s" type="text" id="textfield3" size="5" />
            </span>
              <select name="1st" id="select">
                 <option value="am">am</option>
                  <option value="pm">pm</option>
                  </select>
                <br />
                <span id="sprytextfield2">
                <input name="1e" type="text" id="textfield4" size="5" />
                </span>
                <select name="1et" id="select2">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td><select name="monday1" id="jumpMenu" >
              <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
            </select></td>
            <td>
              <select name="tuesday1" id="jumpMenu9" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="wednesday1" id="jumpMenu17" >
                <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="thursday1" id="jumpMenu25" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="friday1" id="jumpMenu33" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            </tr>
          <tr>
            <td><label>2</label> </td>
            <td><span id="sprytextfield3">
            <input name="2s" type="text" id="textfield5" size="5" />
            </span>
              <select name="2st" id="select3">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />
                <span id="sprytextfield4">
                <input name="2e" type="text" id="textfield6" size="5" />
               </span>
                <select name="2et" id="select4">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td>
              <select name="monday2" id="jumpMenu2" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
           </td>
            <td>
              <select name="tuesday2" id="jumpMenu10" >
                <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="wednesday2" id="jumpMenu18" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
           </td>
            <td>
              <select name="thursday2" id="jumpMenu26" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="friday2" id="jumpMenu34" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            </tr>
          <tr>
            <td><label>3</label> </td>
            <td><span id="sprytextfield5">
            <input name="3s" type="text" id="textfield7" size="5" />
            </span>
              <select name="3st" id="select5">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />
                <span id="sprytextfield6">
                <input name="3e" type="text" id="textfield8" size="5" />
              </span>
                <select name="3et" id="select6">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td>
              <select name="monday3" id="jumpMenu3" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="tuesday3" id="jumpMenu11" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="wednesday3" id="jumpMenu19" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="thursday3" id="jumpMenu27" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="friday3" id="jumpMenu35" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            </tr>
          <tr>
            <td><label>4</label></td>
            <td><span id="sprytextfield7">
            <input name="4s" type="text" id="textfield9" size="5" />
      </span>
              <select name="4st" id="select7">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />
                <span id="sprytextfield8">
                <input name="4e" type="text" id="textfield10" size="5" />
               </span>
                <select name="4et" id="select8">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td>
              <select name="monday4" id="jumpMenu4" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="tuesday4" id="jumpMenu12" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="wednesday4" id="jumpMenu20" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="thursday4" id="jumpMenu28" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="friday4" id="jumpMenu36" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            </tr>
          <tr>
            <td> </td>
            <td colspan="6" align="center"><label>INTERVAL</label> </td>
            </tr>
          <tr>
            <td><label>5</label></td>
            <td><span id="sprytextfield9">
            <input name="5s" type="text" id="textfield11" size="5" />
   </span>
              <select name="5st" id="select9">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />
                <span id="sprytextfield10">
                <input name="5e" type="text" id="textfield12" size="5" />
            </span>
                <select name="5et" id="select10">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td>
              <select name="monday5" id="jumpMenu5" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="tuesday5" id="jumpMenu13" >
<?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="wednesday5" id="jumpMenu21" >
<?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="thursday5" id="jumpMenu29" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="friday5" id="jumpMenu37" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            </tr>
          <tr>
            <td><label>6</label> </td>
            <td><span id="sprytextfield11">
            <input name="6s" type="text" id="textfield13" size="5" />
    </span>
              <select name="6st" id="select11">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />
                <span id="sprytextfield12">
                <input name="6e" type="text" id="textfield14" size="5" />
              </span>
                <select name="6et" id="select12">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td>
              <select name="monday6" id="jumpMenu6" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="tuesday6" id="jumpMenu14" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="wednesday6" id="jumpMenu22" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="thursday6" id="jumpMenu30" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
           </td>
            <td>
              <select name="friday6" id="jumpMenu38" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            </tr>
          <tr>
            <td><label>7</label> </td>
            <td><span id="sprytextfield13">
            <input name="7s" type="text" id="textfield15" size="5" />
     </span>
              <select name="7st" id="select13">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />
                <span id="sprytextfield14">
                <input name="7e" type="text" id="textfield16" size="5" />
              </span>
                <select name="7et" id="select14">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td>
              <select name="monday7" id="jumpMenu7" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="tuesday7" id="jumpMenu15" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="wednesday7" id="jumpMenu23" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="thursday7" id="jumpMenu31" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="friday7" id="jumpMenu39" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
           </td>
            </tr>
          <tr>
            <td><label>8</label> </td>
            <td><span id="sprytextfield15">
            <input name="8s" type="text" id="textfield17" size="5" />
    </span>
              <select name="8st" id="select15">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />
                <span id="sprytextfield16">
                <input name="8e" type="text" id="textfield18" size="5" />
            </span>
                <select name="8et" id="select16">
                  <option value="am">am</option>
                  <option value="pm">pm</option>
                </select>
                <br />

            </td>
            <td>
              <select name="monday8" id="jumpMenu8" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="tuesday8" id="jumpMenu16" >
                  <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
           </td>
            <td>
              <select name="wednesday8" id="jumpMenu24" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            <td>
              <select name="thursday8" id="jumpMenu32" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
           </td>
            <td>
              <select name="friday8" id="jumpMenu40" >
                 <?php

$query="SELECT subject_id,name FROM subject
WHERE subject.not_available='no' and subject_id like '$grade/%'";
$result=mysql_query($query);
while($row = mysql_fetch_array($result))
{
  echo "<option value=\"".$row['subject_id']."\">".$row['name']."</option> \n  ";
}
            ?>
              </select>
            </td>
            </tr>
        </table></td>
        </tr>
      <tr>
        <td colspan="7"> </td>
        <td> </td>
      </tr>
      <tr>
        <td colspan="5">
        <input type="hidden" name="grade" value="<?php echo $grade;?>"/>
        <input type="hidden" name="class" value="<?php echo $class;?>"/>
        <input type="hidden" name="stream" value="<?php echo $stream;?>"/>

        </td>
        <td>

            <input type="submit" name="button" id="button" value="Save" />

        </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td colspan="7" align="center"> </td>
        <td> </td>
      </tr>
    </table>
      <p> </p>
    <p> </p></td>
  </tr>
</table>
</form>
Member Avatar for diafol

Plonking 850 lines of code will not help. Can you narrow your code to the relevant bits?

commented: yeah +0

The data passed to the addTimeTableForm.php was not captured. I think that's the problem. I have just put an echo statement and checked. But it did not showed anything.

<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("student_management",$con);

$grade=isset($_POST["grade"]);
$class=isset($_POST["class"]);
$stream=isset($_POST["stream"]);

echo $grade;
echo $class;
echo $stream;
?>
Member Avatar for diafol

I thought the data was being sent addTimeTableDatabase.php
You don't include the info for that. That's where are the processing happens right?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.