haiii...
i want to generate dynamically generating buttons(that is ,generate number of buttons depending on the number in database at that time)....i will get the values in the form as an arrayList....
i want to get the correspomding value of the button which is clicked....how to set the value field????


thanksss.....

Using PHP you could do the following:

<form name="myform" method="post">
<?
$q="select * from table";
$r=mysql_query($q)
while ($row = mysql_fetch_array($r)){
        $btn_id=$row['btn_id'];
        $btn_value=$row['btn_value'];
?>
<input type="submit" value="<?=$btn_value>" id="<?= $btn_id ?>"><br>
<?
}
?>
</form>

This will create a submit button for every entry in the table storing the value as btn_value and naming the button as btn_id (human readable text)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.