Using a variable in the select sql statement below. Have echoed out the variable and is presenting the correct value. when used in the datalist SQL select, not having any luck? any ideas?
<datalist id="ampgain1">
<?php
$ampgainsql = "SELECT ('".$amp1."') FROM ampgain";
$resultgain = (mysqli_query($link, $ampgainsql));
while($gains = mysqli_fetch_assoc($resultgain))
{
"<option value='" . $gains['".$amp1."']."'>" . $gains['".$amp1."'] . "</option>";
}
$gain1 = $_GET['ampgain1'];
?>
</datalist>