I wonder if there is a way to save these two variables. Here is the code:
<script type="text/javascript">
function opcao()
{
$(document).ready(function()
{
var empresa = $('#Empresa option:selected').val();
$('#Unidades').load('/site/funcoes2.php?emp='+ empresa);
});
}
</script>
///////////////////////////////////////////////////////
<script type="text/javascript">
function uniopcao()
{
$(document).ready(function ()
{
var unid = $('#Unidades option:selected').val();
$('#unn').load('/site/tpago.php?uni='+ unid);
});
}
</script>
I would like to take these two variables (variable "companies" that receives through an onchange the selected company) and a (variable "unid" that receives the chosen unit according to the company chosen.
I wanted to assign these values to a SESSION PHP
as in the example below.
_SESSION['V1']= empresa;
_SESSION['V2'] = unid;
I'll use these two information throughout the rest of the program so I'd like to save them. Thank you.