Hello
I want to count certain entries from the database and deactivate input fields based on the output.
The "input" tag is not the problem. But I don´t know where I have to put the sql code (incomplete)!?
I want to count certain entries from the database and deactivate input fields based on the output.
The "input" tag is not the problem. But I don´t know where I have to put the sql code (incomplete)!?
$sql = "SELECT COUNT(row) FROM db WHERE xy='yx'";
if ($result = mysqli_query($db, $sql)) {
$row = mysqli_fetch_row($result);
$count = $row[0];
<input type="radio" id="id" name="name" value="value" <?php if($count >= $int){ echo "disabled";} ?> >