How to get data of a select option tag into a php variable befor submiting pure php? : I have a table that shows students list the data is shown using a foreach loop.
now inside the table, I have a column to take the attendance a student is whether present or absent. I put the present and absent inside a select tag in HTML.
as looks below:

   

     <table>
          <tr>
            <td>ID</td>
            <td>
              <select name="att">
                 <option value="1">Present</option>
                 <option value="0">Absent</option>
              </select>  
            </td>
         </tr>
       </table>
Now want to take the attendence and update related rows inside the table.
How to get values of IDs and atts to pass through php to the database?
I thought to get the values inside php array and send it but how to get the value from the select tag inside and array I had no idea.
If possible please provide the code.
    
