guys i wrote a dropdown bar connected to a db, but i couldnt make the content of the table thats fetched from db only specified by the option i chose in drop bar, how can i fix this
here’s my code:
$sql = "SELECT CPTE FROM comana";
$stmt = oci_parse($conn, $sql);
oci_execute($stmt);
while ($row = oci_fetch_assoc($stmt)) {
echo "<tr>n";
echo "<td>" . ($row['CPTE'] !== null ? htmlentities($row['CPTE'], ENT_QUOTES) : '') . "</td>n";
echo "</tr>n";
}
echo "</table>n";
i want the table to only fetch the selected option data
New contributor
ty track is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.