<?php
$con = mysql_connect("localhost","root","");
$db = mysql_select_db("abc");
if(!$db){
echo 'Could Not connect database';
}
$sel = mysql_query("select * from user_registration");
?>
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input[type="checkbox"]').click(function(){
//how to select multiple checkbox value here??????????
});
});
</script>
<div>
<?php
while($row = mysql_fetch_array($sel)){
?>
<label>
<input type="checkbox" name="<?php echo $row['user_id']; ?>" value="<?php echo $row['user_id']; ?>">
<?php echo $row['first_name']; ?>
</label>
<?php
}
?>
</div>
<div class="display"></div>
chaitu11 0 Junior Poster
Ajay Gokhale 0 Newbie Poster
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.