title: Changing the database value based on dropdown list (PHP, MYSQLi)
body: <p>Since I am new to an advanced side of PHP, I would like to know how to change the database value by using a dropdown option list.</p>
  
  <p><strong>Users view of the page: This is what the user will see on the webpage. The users should be able to assign the sensors by selecting the sensors with the checkbox and using the drop down list to assign the sensor to a particular school.</strong>
  <img src="https://i.stack.imgur.com/37X4r.png" alt="This is what the user will see on the webpage. The users should be able to assign the sensors by selecting the sensors with the checkbox and using the drop down list to assign the sensor to a particular school."></p>
  
  <p><strong>SenSG Table: This is the table, Sensg, where all the sensors' information are stored. The school_id is the value which I would want to change when the users checkbox a sensor and choose a school in the dropdown.</strong>
  <img src="https://i.stack.imgur.com/Dnk3u.png" alt="This is the table, Sensg, where all the sensors&#39; information are stored. The school_id is the value which I would want to change."></p>
  
  <p><strong>School Table: This is the table, School, where all the schools with their respective school_id. The school_id is not auto-incremented.</strong></p>
  
  <p><img src="https://i.stack.imgur.com/XvmBp.png" alt="This is the table, School, where all the schools with their respective school id."></p>
  
  <p>How do I go about in changing the school_id of SenSG table when I assign a particular or more sensors to a respective school using a dropdown list and it will change its value based on the dropdown list.</p>
  
  <p>For example,
  If I check-boxed the first sensor and choose the dropdown box of option 'Republic Poly', the school_id in the SenSG table should change according to the dropdown value.</p>
  
  <p>How do I go about doing this in PHP as I am completely lost.</p>
  
  <p>Thank you.</p>