I have this php code that get items from the database and i have to use this drop-down in my JavaScript code to duplicate the same drop-down when a button is clicked
function dup(){
}
<?php
include('view/connect.php');
$sql="SELECT ss_code FROM ss WHERE sn_id = 1";
$result =mysql_query($sql);
$dropdown = "<select name='users'>";
while($row = mysql_fetch_assoc($result)) {
$b = $row['ss_code'];
$dropdown .= "\r\n<option value='{$b}'>{$b}</option>";
}
$dropdown .= "\r\n</select>";
echo $dropdown;
?>