title: show hidden div content when button is pressed
body: <p>Hi guys? how can i hide div content until a button is pressed?. Can anyone help me please.I want this div not to show up until the "add new teacher" button in the table is pressed. This is the div content which i want it to be hidden until the button is pressed</p>
  
  <pre><code>     &lt;div id="myform"&gt;
  &lt;p align="center"&gt;
  &lt;strong&gt;
  Add information for new teacher here
  &lt;/strong&gt;&lt;/p&gt;
  &lt;form action="&lt;?php echo $editFormAction; ?&gt;" method="post" name="form1" id="form1"&gt;
    &lt;table align="center" id="forms"&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;First name:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="first_name" value="" size="32" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;Last name:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="last_name" value="" size="32" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;Subjects:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="subjects" value="" size="32" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;Phonenumber:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="phonenumber" value="" size="32" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;Email:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="email" value="" size="32" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;Username:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="username" value="" size="32" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;Password:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="password" value="" size="32" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr valign="baseline"&gt;
        &lt;td nowrap="nowrap" align="right"&gt;&amp;nbsp;&lt;/td&gt;
        &lt;td&gt;&lt;input type="submit" value="Insert record" id="hideit"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
    &lt;input type="hidden" name="MM_insert" value="form1" /&gt;
  &lt;/form&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And this is my table which contain "Add New Teacher" button</p>
  
  <pre><code>    &lt;p align="center"&gt;
  &lt;strong&gt;
  List of teachers in Minaki Sec school
  &lt;/strong&gt;&lt;/p&gt;
  &lt;table border="1" align="center" class="altrowstable" id="alternatecolor"&gt;
    &lt;tr id="row"&gt;
      &lt;th&gt;teacher id&lt;/th&gt;
      &lt;th&gt;first name&lt;/th&gt;
      &lt;th&gt;last name&lt;/th&gt;
      &lt;th&gt;subjects&lt;/th&gt;
      &lt;th&gt;Phonenumber&lt;/th&gt;
      &lt;th&gt;Email&lt;/th&gt;
      &lt;th&gt;username&lt;/th&gt;
      &lt;th&gt;password&lt;/th&gt;
      &lt;th&gt;Edit&lt;/th&gt;
      &lt;th&gt;Delete&lt;/th&gt;
      &lt;th&gt;Details&lt;/th&gt;
    &lt;/tr&gt;
    &lt;?php do { ?&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['teacher_id']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['first_name']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['last_name']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['subjects']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['phonenumber']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['email']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['username']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $row_teacherrec['password']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;button onclick="location.href= 'edit_teacher.php? teacher_id=&lt;?php echo $row_teacherrec['teacher_id']; ?&gt;'"&gt;Edit&lt;/button&gt;&lt;/td&gt;
        &lt;td&gt;&lt;button onclick="location.href= 'delete_teacher.php? teacher_id=&lt;?php echo $row_teacherrec['teacher_id']; ?&gt;'"&gt;Delete&lt;/button&gt;&lt;/td&gt;
        &lt;td&gt;&lt;button onclick="location.href= 'edit_teacher.php? teacher_id=&lt;?php echo $row_teacherrec['teacher_id']; ?&gt;'"&gt;Details&lt;/button&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php } while ($row_teacherrec = mysql_fetch_assoc($teacherrec)); ?&gt;
      &lt;tr&gt;
      &lt;td colspan="8"&gt;&lt;/td&gt;
      &lt;td colspan="6" align="center"&gt;&lt;button id="showit" onclick="location.href='teacher.php'"&gt;+Add new Teacher&lt;/button&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;/table&gt;
  </code></pre>