In the first if statement am I properly checking for a post variable? Also, is the post variable's name the same as the input name?
Code:
if(isset($_POST('job_select')))
{
$job_name=$_POST('job_select');
$result=mysql_query("SELECT DISTINCT labor_code FROM oats_jobs_users_laborCode where user='$user_name' and job_name='$job_name' order by job_name;");
if($result)
{
echo "<select name=\"laborcode\" onchange=\"timecard.submit()\" > <option default=\"default\" value=\"\">Choose One</option>";
while($row=mysql_fetch_row($result))
{
echo "<option value=\"$row[0]\">$row[0]</option>";
}
echo "</select>";
}
Comment