Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9144019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:09:59+00:00 2026-06-17T10:09:59+00:00

Anyone who create a simple delete in codeigniter. help me! . this is my

  • 0

Anyone who create a simple delete in codeigniter. help me!.
this is my view

<a href="<?php echo base_url(); ?>home/del/<?php echo $row->id; ?>">Delete</a>

Help me to create a simple delete data in codeigniter .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:10:00+00:00Added an answer on June 17, 2026 at 10:10 am

    You can do it like this
    Controller

    Class Home Extends CI_Controller
    {
        function __construct()
        {
            parent::__construct();
            $this->load->model('mymodel');
        }
    
        function index()
        {
            //blah blah
        }
    
        function del()
        {
            $id =   $this->uri->segment(3);
            $this->mymodel->delete($id);
            redirect('home/index');
        }
    }
    

    Model

    Class Mymodel Extends CI_Model
    {
        function __construct()
        {
            parent::__construct();
        }
    
        function delete($id)
        {
            $this->db->where('id',$id);
            $this->db->delete('tablename');
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone who knows a good way to generate/create a barcode from a String in
To anyone who can help, Thanks Okay, so I have a database holding a
(Bonus internets for anyone who can explain how I can do this in both
Is there anyone who knows this? I have been trying this for the last
I am looking for anyone that can help create some source and a tutorial
Has anyone used RubyMine who could help me out? I am new to RubyMine,
I am attempting to create a behavior tree using C#. For anyone who doesn't
I hope this question has an obvious answer to anyone who knows his way
I am trying to create a simple login credentials checker (with session variables). this
Anyone who can answer my question deserves a BIG FAT GOLD MEDAL OF AWESOMENESS!

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.