[eluser]tusukgigi[/eluser]
example
Controllers---->>>>
function loopdb(){
$data['users'] = $this->MUsers->getAllUsers();
$this->load->vars($data);
$this->load->view('profile/v_loopdb');
}
Views----->>>>
<html>
<head>
[removed][removed]
[removed]
$(document).ready(function(){
$('.theclickers').click(function(){
$('#myForm').slideToggle();
});
});
[removed]
<head>
<body>
<?php
if(count($users)){
foreach($users as $key => $lists){
?>
<a href='#' class='theclickers'><?php echo $lists['nick'];?></a><br />
<form action="" method="post" style='display:none;' id='myForm'>
<input type='text' name='toDown' id='toDown' />
<input type='submit' name='submit' value='save'>
</form>
<?php
}
}
?>
</body>
</html>
-----------------------------------------------------
with the above code, I can only access a single id.
if another link is clicked
id only the first course that appears
how to i can access id data from database looping with jquery and save to database