<select name=""> variable from javascript
Posted: Fri Aug 21, 2009 1:23 pm
I have a table where i add rows with a javascript and each row contains this code for a select form.
But i need each "<select name=" to be unique. So how can i insert a variable from the javascript into this tag? Or is there other ways?
But i need each "<select name=" to be unique. So how can i insert a variable from the javascript into this tag? Or is there other ways?
Code: Select all
<td id="spiller">
<?php
$data = mysql_query("SELECT * FROM _spiller")
or die(mysql_error());
echo "<select name=spiller>";
while($info = mysql_fetch_array( $data ))
{
print "<option value=".$info['spiller'] . ">".$info['spiller'] . "</option>";
}
print "</select>";
?>
</td>