Welcome Guest, Not a member yet? Register   Sign In
deleting a row using checkbox
#1

[eluser]sasori[/eluser]
hi, can you guys help me develope the logic for this? yes i mean code snippets
here's my controller code
Code:
public function members_area()
  {
    $this->load->model('member_model');
    $data['q'] = $this->member_model->get_urls();
    $data['title'] = "Members Area";
    $data['main_content'] = 'includes/member_view';
    $this->load->view('includes/template',$data);
  }

here's my model code

Code:
public function get_urls()
  {
    $q = $this->db->get('bookmark');
    return $q;
  }

here's my view code

Code:
<table>
&lt;?php form_open('site/delete'); ?&gt;
<tr><td><b>Bookmark</b></td><td><b>Delete</b></td></tr>
&lt;?php foreach($q->result() as $row):?&gt;
        &lt;?php echo "<tr>"; ?&gt;
        &lt;?php echo "<td>".anchor($row->bm_URL,$row->bm_URL)."</td>"; ?&gt;
        &lt;?php echo "<td>".form_checkbox('delete',$row->bm_URL)."</td>"; ?&gt;
        &lt;?php echo "</tr>"; ?&gt;
&lt;?php endforeach; ?&gt;
</table>

here's the initial look
Code:
http://i47.tinypic.com/24vp81v.jpg

if am gonna place a delete link or button at the bottom, how will i make the "checked"
box be deleted ?


Messages In This Thread
deleting a row using checkbox - by El Forum - 01-29-2010, 04:07 AM
deleting a row using checkbox - by El Forum - 01-29-2010, 04:23 AM
deleting a row using checkbox - by El Forum - 01-29-2010, 04:48 AM
deleting a row using checkbox - by El Forum - 01-29-2010, 04:51 AM
deleting a row using checkbox - by El Forum - 01-29-2010, 05:04 AM
deleting a row using checkbox - by El Forum - 01-29-2010, 05:08 AM
deleting a row using checkbox - by El Forum - 01-29-2010, 05:13 AM
deleting a row using checkbox - by El Forum - 02-20-2010, 05:28 PM
deleting a row using checkbox - by El Forum - 02-20-2010, 09:42 PM
deleting a row using checkbox - by El Forum - 02-12-2011, 02:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB