Hello, I needed to pass the value from one to a parameter of a link, this to be sent via GET. I'm using the codeigniter framework.
Here's the code snippet I have:
<div class="col-xs-12 col-md-3 form-num-sala">
<div class="row">
<div class="col-xs-12 col-md-8" style="margin-left:-55px;">
<div class="form-group">
<label>Designação da sala</label>
<br/>
<select name="designacaoSala" class="form-control">
<?php foreach ($designacaoSala as $numsala) { ?>
<option value="<?php echo $numsala->numerosala ?>">
<?php echo $numsala->numerosala ?>
</option>
<?php } ?>
</select>
</div>
</div>
<div class="col-xs-12 col-md-4" style="margin-left:-25px;">
<label>Aplicar</label>
<br/>
<a href="<?php echo site_url('utilizador/addSalaEspacoEvento/?idplano='.$hDefenidos->idplanoespacoevento.'&numerosala='); ?>">
<button class="form-control"><i class="fa fa-check"></i></button>
</a>
</div>
</div>
</div>
The variable $hDefenidos->idplanoespacoevento
comes from above but the variable & numerosala should come from select with the name "designacaosala" and be assigned to the following link:
<a href="<?php echo site_url('utilizador/addSalaEspacoEvento/?idplano='.$hDefenidos->idplanoespacoevento.'&numerosala='); ?>">
<button class="form-control"><i class="fa fa-check"></i></button>
</a>
Can anyone give a force? Thank you