I have Checkboxes, the last checkbox is OTHER if the user clicks it, a textbox will appear. I want to get the value of the textbox and pass it on my checkbox, I do not know how to do it. This is my code, I used loop to get the checked checkbox, and check if textbox is empty. I hope you can understand this. Thank You!
$n = count($_SESSION['sch']);
$schp="";
for($i=0;$i<$n; $i++)
{
$schp .= $_SESSION['sch'][$i]. "; ";
}
echo $schp;
if (empty($_POST['txtOSch'])){
echo 'a';
}
else{
$_SESSION['txtOSch'] = $_POST['txtOSch'];
echo $_SESSION['txtOSch'];
}