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
<div id="myform">
<p align="center">
<strong>
Add information for new teacher here
</strong></p>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table align="center" id="forms">
<tr valign="baseline">
<td nowrap="nowrap" align="right">First name:</td>
<td><input type="text" name="first_name" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Last name:</td>
<td><input type="text" name="last_name" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Subjects:</td>
<td><input type="text" name="subjects" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Phonenumber:</td>
<td><input type="text" name="phonenumber" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Email:</td>
<td><input type="text" name="email" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Username:</td>
<td><input type="text" name="username" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">Password:</td>
<td><input type="text" name="password" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="Insert record" id="hideit"/></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1" />
</form>
<p> </p>
</div>
And this is my table which contain "Add New Teacher" button
<p align="center">
<strong>
List of teachers in Minaki Sec school
</strong></p>
<table border="1" align="center" class="altrowstable" id="alternatecolor">
<tr id="row">
<th>teacher id</th>
<th>first name</th>
<th>last name</th>
<th>subjects</th>
<th>Phonenumber</th>
<th>Email</th>
<th>username</th>
<th>password</th>
<th>Edit</th>
<th>Delete</th>
<th>Details</th>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_teacherrec['teacher_id']; ?></td>
<td><?php echo $row_teacherrec['first_name']; ?></td>
<td><?php echo $row_teacherrec['last_name']; ?></td>
<td><?php echo $row_teacherrec['subjects']; ?></td>
<td><?php echo $row_teacherrec['phonenumber']; ?></td>
<td><?php echo $row_teacherrec['email']; ?></td>
<td><?php echo $row_teacherrec['username']; ?></td>
<td><?php echo $row_teacherrec['password']; ?></td>
<td><button onclick="location.href= 'edit_teacher.php? teacher_id=<?php echo $row_teacherrec['teacher_id']; ?>'">Edit</button></td>
<td><button onclick="location.href= 'delete_teacher.php? teacher_id=<?php echo $row_teacherrec['teacher_id']; ?>'">Delete</button></td>
<td><button onclick="location.href= 'edit_teacher.php? teacher_id=<?php echo $row_teacherrec['teacher_id']; ?>'">Details</button></td>
</tr>
<?php } while ($row_teacherrec = mysql_fetch_assoc($teacherrec)); ?>
<tr>
<td colspan="8"></td>
<td colspan="6" align="center"><button id="showit" onclick="location.href='teacher.php'">+Add new Teacher</button></td>
</tr>
</table>