okay here is the form:
<FORM METHOD=POST ACTION="activityadd.php">
<input type="hidden" name="id" value="NULL">
<table width="94%" border="0" cellspacing="0" cellpadding="3">
<tr align="left" valign="top">
<td width="14%"> </td>
<td width="12%"> </td>
<td width="10%"> </td>
<td width="29%"> </td>
<td width="14%"> </td>
<td width="21%"> </td>
</tr>
<tr align="left" valign="top">
<td width="14%" align="right">Client ID</td>
<td width="12%">
<?
echo ('<select name="client_id">');
$sql = "SELECT client_id, client_id FROM client_details ";
$results = mysql_query($sql);
while ($row=mysql_fetch_array($results,MYSQL_ASSOC))
{
print "<option value=".$row["client_id"].">".$row["client_id"]."</option>\n";
};
echo '<option selected>select...</option>';
echo ('</select>');
?>
</td>
<td width="10%" align="right">Worker </td>
<td width="29%">
<?
echo ('<select name="worker_id">');
$sql = "SELECT worker_id, worker_id FROM dropdowns ";
$results = mysql_query($sql);
while ($row=mysql_fetch_array($results,MYSQL_ASSOC))
{
print "<option value=".$row ['worker_id'].">".$row['worker_id']."</option>\n";
};
echo '<option selected>select...</option>';
echo ('</select>');
echo($row['worker_id']) ;
?>
<?echo("<br><input name='address' value='$row[worker_id]'>") ;
?>
</td>
<td width="14%" align="right">Service Type</td>
<td width="21%">
<?
echo ('<select name="service_type">');
$sql = "SELECT service_id, service_id FROM dropdowns ";
$results = mysql_query($sql);
while ($row=mysql_fetch_array($results,MYSQL_ASSOC))
{
print "<option value=".$row["service_id"].">".$row["service_id"]."</option>\n";
};
echo '<option selected>select...</option>';
echo ('</select>');
?>
</td>
</tr>
<tr align="left" valign="top">
<td width="14%" align="right">Date Start</td>
<td width="12%">
<input type="text" name="date_event_start" value="YYYY-MM-DD" size="15">
</td>
<td width="10%" align="right">Date End</td>
<td width="29%">
<input type="text" name="date_event_end" value="YYYY-MM-DD" size="15">
</td>
<td width="14%" align="right">Hours worked</td>
<td width="21%">
<input type="text" name="applied_hours" size="10">
<input type="hidden" value="<? $today; ?>" size="15" name="date_recorded">
<? print "<input type='hidden' value='$today' size='15' name='date_recorded'>" ?>
</td>
</tr>
<tr align="left" valign="top">
<td width="14%" align="right">contract </td>
<td width="12%">
<?
echo ('<select name="contract_id">');
$sql = "SELECT contract_id, contract_id FROM dropdowns ";
$results = mysql_query($sql);
while ($row=mysql_fetch_array($results,MYSQL_ASSOC))
{
print "<option value=".$row["contract_id"].">".$row["contract_id"]."</option>\n";
};
echo '<option selected>select...</option>';
echo ('</select>');
?>
</td>
<td width="10%" align="right"> </td>
<td width="29%"> </td>
<td width="14%" align="right"> </td>
<td width="21%"> </td>
</tr>
<tr align="left" valign="top">
<td width="14%" align="right">Notes</td>
<td colspan="3">
<textarea name="notes" cols="50" rows="5" wrap="PHYSICAL"></textarea>
</td>
<td width="14%" align="right"> </td>
<td width="21%"> </td>
</tr>
<tr align="left" valign="top">
<td width="14%" align="right"> </td>
<td width="12%"> </td>
<td width="10%" align="right">
<input type="submit" value="Submit" name="submit">
</td>
<td width="29%"> </td>
<td width="14%" align="right"> </td>
<td width="21%"> </td>
</tr>
</table>
and here is the code from the page that inputs the information into the database:
$sqlquery = "INSERT INTO $table
VALUES('$client_id', '$service_type', '$date_event_start', '$date_event_end', '$date_recorded', '$worker_id', '$notes', '$applied_hours', '$contract_id' )";
$results = mysql_query($sqlquery);
mysql_close();
thanks