7
I would like to know if there is a way to save these two following variables. Follows 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 chosen company.
I wanted to assign these values in a SESSION PHP
as in the example below.
_SESSION['V1']= empresa;
_SESSION['V2'] = unid;
I’m going to use that information throughout the rest of the program so I’d like to save it. Thank you.
thanks both answers it was valid thank you for the attention
– Tiago