In a php file I have:
while($row = mysqli_fetch_array($result)) {
$mystring=$row['COL 2'];
echo "<button type=\"button\" id=\"addbutton\" value=\"$mystring\" onclick=\"selectedClasses()\")\">Add Class</button>";
}
The values are successfully retrieved and the buttons are successfully created, however, every button ends up containing the value of the first entry.
Is there any way to keep the values updated for each button value?