Search code examples
phpmaterialize

My Select does not appear


I'm on a product editing page, so i have first option to show the old record, and the second to show the rest of the options. Yes I have a query to show the first option. I'm using materialize.

<i class="material-icons prefix">payment</i>
<select name="NomeMarca">
<option value="<?php echo $row['idBrand']?>" disabled selected><?php echo $row['name'] ?></option>
<?php
$sql = "SELECT * From brands Order by idBrand";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()){?>
        <option value="<?php echo $row['idBrand'] ?>"><?php echo $row['name'] ?></option>
        <?php } ?>
<?php } ?>
</select>
<label>Marca</label>

html

<i class="material-icons prefix">payment</i>
<select name="NomeMarca">
<option value="2" disabled selected>Konica-Minolta</option>
    <option value="2">Konica-Minolta</option>
    <option value="3">Kyocera</option>
    <option value="4">Xerox</option>
    <option value="5">Samsung</option>
    <option value="6">Brother</option>
    <option value="7">Lexmark</option>
    <option value="8">Canon</option>
 </select>

Solution

  • Make sure the correct links are declared on the top of the document!