I'm trying to build a form that lets a user enter a day, time arrived, time left and time for lunch,then click insert to update a data base.
once it's inserted a new identical form should appear to collect the same data, but for the next day.
(Overall when the user is done they will have entered all there work hours for the week and I'll minus lunch times to see if they qualify for any overtime).
this is my code, I can't make the form show on the screen and on the "onclick" event submit and reshow the new identical form.
Please help.
<form id="form1" name="form1" method="post" action="ot_request.php">
<table width="805" height="51" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="182" height="21" align="left" valign="top" scope="row">Day</th>
<td width="182" align="left" valign="top"><strong>Time Arrived </strong></td>
<td width="182" align="left" valign="top"><strong>Time Departed</strong></td>
<td width="182" align="left" valign="top"><strong>Time Taken For Lunch</strong></td>
<td width="77" align="left" valign="top"> </td>
<?php
if (isset($_POST['Submit'])) {
while ($x > 1){
$eday =
"<tr>
<th height='30' align='left' valign='top' scope='row'><p>
<input type='text' name='day' /></p>
</th>
<td align='left' valign='top'><p>
<input type='text' name='arrived' />
</p>
</td>
<td align='left' valign='top'><p>
<input type='text' name='left' /></p>
</td>
<td align='left' valign='top'><p>
<input type='text' name='lunch' />
</p>
</td>
<td align='left' valign='top'> </td>
</tr>";
echo $eday;}} ?>
</tr>
</table>
<p>
<label>
<input type="submit" name="Submit" value="New Entry" onclick"<?php $x++;?>"/>
</label>
</p>
</form>
once it's inserted a new identical form should appear to collect the same data, but for the next day.
(Overall when the user is done they will have entered all there work hours for the week and I'll minus lunch times to see if they qualify for any overtime).
this is my code, I can't make the form show on the screen and on the "onclick" event submit and reshow the new identical form.
Please help.
<form id="form1" name="form1" method="post" action="ot_request.php">
<table width="805" height="51" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="182" height="21" align="left" valign="top" scope="row">Day</th>
<td width="182" align="left" valign="top"><strong>Time Arrived </strong></td>
<td width="182" align="left" valign="top"><strong>Time Departed</strong></td>
<td width="182" align="left" valign="top"><strong>Time Taken For Lunch</strong></td>
<td width="77" align="left" valign="top"> </td>
<?php
if (isset($_POST['Submit'])) {
while ($x > 1){
$eday =
"<tr>
<th height='30' align='left' valign='top' scope='row'><p>
<input type='text' name='day' /></p>
</th>
<td align='left' valign='top'><p>
<input type='text' name='arrived' />
</p>
</td>
<td align='left' valign='top'><p>
<input type='text' name='left' /></p>
</td>
<td align='left' valign='top'><p>
<input type='text' name='lunch' />
</p>
</td>
<td align='left' valign='top'> </td>
</tr>";
echo $eday;}} ?>
</tr>
</table>
<p>
<label>
<input type="submit" name="Submit" value="New Entry" onclick"<?php $x++;?>"/>
</label>
</p>
</form>