I learn PHP and in one of examples I found a part of a code I don't understand.
....
if (array_key_exists('submited', $_POST)) {
for ($i = 1; $i <= $_SESSION['counter']; $i++) {
if (!empty($_POST['checkeditem' . $i]))
if ($_POST['checkeditem' . $i] == 'on') {
$rezultat = mysqli_query($conn, "DELETE FROM gas WHERE id=" . $i);
echo "Checked items are deleted";
}
}
} else {
....
In the code above I don't understand this code line:
$_POST['checkeditem' . $i] == 'on'
There is no attribute with the name='on' in entire code, so it is not related to any name attribute. What is value 'on' and is there other values like that one, that are related to $_POST? Could you suggest me what to google, to find more about this? Thank you.