I would like to know how to update a select
with data coming from another.
I currently use SQL, I already have a connection created:
$connection = new COM("ADODB.Connection"); //instancia a classe de conexao
$connection->Open("PROVIDER=SQLOLEDB;Data Source=.;Initial Catalog=ADM;User ID=userxxx; Password=userxxx"); //estabelece conexão com MSSQL
<select>
<option value="01">Empresa Construção</option>
<option value="02">Empresa Prod Beleza</option>
<option value="03">Empresa agricola</option>
<option value="04"selected>Empresa comida</option>
</select>
I wanted you to automatically search my database for the information in the table and automatically fill it out automatically with the information for that company only.
<select>
<option value="01">Tintas</option>
<option value="02">madeira</option>
<option value="03">Cimento</option>
<option value="04"selected>Pedra</option>
</select>