I'm having a problem with my code where there's a select that's 'disabled' and it doesn't send the data to the next page. I've tried using hidden input but it didn't work.
This is the part where the code takes the value of the $payt variable and it is selected for the user, but he cannot change it.
<select name="payt" id="payt" <?php if ($tsktype == "csd") { echo "readonly"; } ?>>
<option value="<?php echo $payt ?>"><?php echo $payt ?></option>
<?php
while($rowpayt = @mysqli_fetch_array($aPAYT,MYSQLI_ASSOC))
{
$payt = $rowpayt['payTerms'];
$paytd = $rowpayt['ptdescr'];
?>
<option value="<?php echo $payt ?>"><?php echo $paytd ?></option>
<?php
}
?>
</select>
And here is the part of the other file where he was supposed to receive it.
if(!empty($_POST['payt'])){
$payt = $_POST['payt'];
echo "AQUI ESTÁ O PAYT: $payt";
}
else{
echo "Não está definida";
}
I've already tried it as readonly and hidden, neither worked.
readonlyis not supported onselecttypes, so it would not be an option.