My drop down is blank as shown below:

I tried to generate this drop down using the code below:
<?php
$mysqli = NEW MYSQLI('localhost', 'root', '','staff');
$resultSet = $mysqli->query("Select tripid from college");
?>
<label for="">Trip ID</label>
<p>
<select name="tripid" id="tripid" style="width: 300px">
<option value='-1' selected>Trip ID</option>
<php?
while ($rows = $resultSet->fetch_assoc()){
$tripid = $rows['$tripid'];
echo "<option value='$tripid'>$tripid</option>";
}
?>
</select>
>Solution :
So it’s generating something but it’s apparently blank. It would be really helpful to see what the generated HTML looks like instead of a picture of an HTML element. The code is important here, not what it looks like.
However, I suspect it’s just rendering these literal strings:
<option value='$tripid'>$tripid</option>
<option value='$tripid'>$tripid</option>
<option value='$tripid'>$tripid</option>
I also suspect that $rows['$tripid'] should be $rows['tripid'] since it’s unlikely that you have key name with $ in it like a PHP variable.
In your PHP code you need to concatenate the HTML string with the PHP variables, like this:
while ($rows = $resultSet->fetch_assoc()){
$tripid = $rows['tripid'];
echo "<option value='" . $tripid . "'>" . $tripid . "</option>";
}
now it should render the actual variable content, like this:
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>