I have two file lets assume 1.php and 2.php
1.php is my fetch data so it contains
echo '<tr onclick="javascript:showRow(this);">';
echo "<td><input type=\"checkbox\" name=\"user_id[]\" value='".$user_id."'/>$user_id</td>";
my second php 2.php contains
<script type="text/javascript">
function showRow(row)
{
var x=row.cells;
document.getElementById("custID").value = x[3].innerHTML;
}
</script>
and
<input class="form-control" name="event_name" id="custID" type="text" maxlength="255" />
My problem is that it only displays 1 value from the checkbox to the textbox. I would like it to display multiple value from the multiple checkbox so i could send multiple value to a form post. Thanks in advance fellow stranger
may be this is what you want . just use addValue instead of your showRow function