Can I use the same name="" in two inputs of type checkbox to do a validation in PHP?
For example, I want to get the value of the checked checkbox and do a validation, but it is not taking any value.
<input id="add-festa-k" onclick="marcaDesmarcaFesta(this)" class="tfesta" type="checkbox" name="tipoFesta" value="1499" />
<label for="add-festa-k">Festa 1</label>
<input id="add-festa-k" onclick="marcaDesmarcaFesta(this)" class="tfesta" type="checkbox" name="tipoFesta" value="2000" />
<label for="add-festa-k">Festa 2</label>
<?php
$tipoFesta = $_POST['tipoFesta'];
if($tipoFesta >= 2000){
$tipoFesta = 'Festa 2';
}else{
$tipoFesta = 'Festa 1';
}
?>