
I have a table where a user can input up to 20 employee ID #s and once they hit the submit button, it will display all 20 employee's information (first name, last name, dept, etc.) on the same page. This is what I wanted but after looking at my table, I want to take it one step further.
I am wondering if I can create a separate submit button for each row so that if they input an incorrect ID #, they can re-search just that ONE row and won't erase the entire table. Anyway ideas????
Here is a bit of my code and I have attached an image my table:
- Code: Select all
$data1 = mysql_query("SELECT * FROM table_name WHERE id LIKE '$search1'") or die(mysql_error());
echo "<tr height='40'>";
echo "<td class='int_numbers'>1</td>";
echo "<td><input name='id1' type='text' size='5' maxlength='5' /></td>";
while($info1 = mysql_fetch_array( $data1 ))
{
echo "<td><input type='text' size ='5' name='id1' value='". $info1['oasis']."'/></td>";
echo "<td><input type='text' size ='18' name='id1' value='".$info1['lname'] ."'/></td>";
echo "<td><input type='text' size ='15' name='id1' value='".$info1['fname'] . "'/></td>";
echo "<td><input type='text' size ='15' name='id1' value='".$info1['service'] ."'/></td>";
echo "<td><input type='text' size ='5' name='id1' value='".$info10['level'] ."'/></td>";
echo "</tr>";
}

