I have looked in quite a few places and cannot find the a really good example of what I need. I have a button that when submitted needs to pop up a form. I have done this in the past using the input=hidden name. However, I am using trying to use if statements instead of just a variable. I will give you the code that I have in hopes that you can help find out what exactly I am doing wrong. You can see that I am indeed using the hidden name for some but I really don't know how to incorporate that into the if statements.
if($row[status] == 0) { print "<input type='image' src='images/rework-ticket.png' alt='Rework' value='Rework' name='button' style='height:50px; width:50px; '>"; }
elseif($row[status] == "Rework (In Progress)") { print "<img src='images/rework-ticket.png' alt='Rework' style='height:50px; width:50px; '>"; }
print "<td align='center'>";
print "<form method='post' action='test2.php'>";
print "<input type='image' src='images/rework-ticket.png' alt='Add Rework Ticket' value='Enter Employee ID' name='button' style='height:50px; width:50px; '>";
print "<input type='hidden' name='proceed_to_rework' value='true'>";
print "<input type='hidden' name='invoice_number' value='$row[invoice_number]'>";
print "<input type='hidden' name='last_name' value='$row[last_name]'>";
print "<input type='hidden' name='status' value='$status'>";
print "Status:";
print "<td><select name='status' size='1'>";
if($status != NULL) { print "<option value='$status'>$status</option>"; }
if($status != "Parts Prep (In Progress)") { echo "<option value='Parts Prep (In Progress)'>Parts Prep (In Progress)</option>"; }
if($status != "Parts Prep (Complete)") { echo "<option value='Parts Prep (Complete)'>Parts Prep (Complete)</option>"; }
if($status != "Assembly (In Progress)") { echo "<option value='Assembly (In Progress)'>Assembly (In Progress)</option>"; }
if($status != "Assembly (Complete)") { echo "<option value='Assembly (Complete)'>Assembly (Complete)</option>"; }
if($status != "Finish (In Progress)") { echo "<option value='Finish (In Progress)'>Finish (In Progress)</option>"; }
if($status != "Finish (Complete)") { echo "<option value='Finish (Complete)'>Finish (Complete)</option>"; }
if($status != "Plumbing (In Progress)") { echo "<option value='Plumbing (In Progress)'>Plumbing (In Progress)</option>"; }
if($status != "Plumbing (Complete)") { echo "<option value='Plumbing (Complete)'>Plumbing (Complete)</option>"; }
print "</form>";
print "</td>";
I really appreciate any comments on how I can not only fix this code but improve this question.