Gibt es eine Möglichkeit für PHP, dass sie nur Nicht-Blank-Werte an HTML Select übergeben können?

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Gibt es eine Möglichkeit für PHP, dass sie nur Nicht-Blank-Werte an HTML Select übergeben können?

by Anonymous » 03 Apr 2025, 04:13

Ich habe eine phpMyadmin-basierte SQL-Datenbank und eine HTML-Seite mit einem Formular, das mithilfe von PHP sowohl lesen als auch in die Datenbank schreiben kann. The form has some dropdown menus, some of which are populated using columns from the database using a php foreach syntax like so:


PHP:

{
$conn = mysqli_connect('localhost','root','','db_name');
$result = mysqli_query($conn,"SELECT DISTINCT Chemical from table_name");
$Chemical = $result->fetch_all(MYSQLI_ASSOC);
}

HTML:

Top