It is "hand coding" a SQL statement to return the correct weight and price from your database. Since any database structure is supported, you need to write the query to return the correct weight and price based on the users selection into a Recordset.
You don't need to hand code any php, but you do have to apply a Recordset in Advanced view and probably hand code your SELECT statement to get the value from your database based on your database structure.
Having the ItemID as the option value makes sense, because you would probably use that in the hand coded SQL statement to find the associated weight and price for that item in your database.