-1
I have this code below and working, it publishes the data only when it indicates 1 in the 'Ready' field of the table, and if it is the number 0 the data is not shown. But I wanted that when the table data that is marked with 0, and that is words represented by butons, in this case indicating therefore that they are not published, were published with the disabled attribute, to show the user the themes or words that will soon be active. Someone has an idea about this programming?
<?php
include 'conn.php';
$letter = $_GET["letter"];
$sql = "SELECT id,palavra from dicionario_basico where Pronta != 0 AND palavra LIKE '".$letter."%' ORDER BY palavra";
$result = $conn->query($sql);
$sql2 = "SELECT DISTINCT(SUBSTR(`palavra`, 1, 1)) As abc from dicionario_basico where pronta != 0 ORDER BY abc";
$result2 = $conn->query($sql2);
?>
At the moment it’s like this and I still can’t associate or exchange for your code: <tbody> <! -- WORD LIST --> <tr> <th Scope="Row" id="" style="background-color:#fafafa;"><? php if ($result->num_rows > 0) { while($Row = $result->fetch_assoc()) { ?>
– Meireles
The solution is in
<?php echo ($value['pontas'] == 0 ? 'disabled' : '')?>
. my code is just an example.– matheus ale da silva