Skip to main content

Add/Edit/Delete Using CodeIgniter

Language


In my previous example about Shopping Cart with Checkout Using CodeIgniter, I have a products table but without a product management.

In this code sample, you’ll learn how to manage a product with add/edit/delete function using CodeIgniter.

BTW, I have change the primary key of the products table from “serial” to “id”.

This code is totally a separate project. But you can also learn from our previous example on how to build a complete application with shopping cart with product management.

Visit our CodeIgniter tutorial and learn how to configure it.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted byAnonymous (not verified)on Mon, 01/07/2013 - 00:16

hi sir, can you help me for the making of our system. i'm willing to pay, can i get your email so we can talk more of this :) thank you so much.

Submitted byMOHAMED SHAREEF (not verified)on Sat, 07/20/2013 - 15:25

PLEASE ADD DATABASE FOR WORKING PROPERLY

Submitted bydipak kumar burnwal (not verified)on Mon, 07/22/2013 - 22:17

really great work sir and thanks for the code

Submitted byManis (not verified)on Thu, 12/12/2013 - 13:31

first please create a database with name "Products" and then create a table name "Products" in that database.
add fields "id,name,description,price,picture" in products table.

after adding this database,table ,fields this application will work perfectly,

Regards Mani.

Submitted byjoyceT (not verified)on Sun, 12/15/2013 - 15:33

i already make database and table, and also fields, after that it only shows like this "Products (Manage)", when i click "Manage" since that's the only things that is clickable, it returns on the the localhost, where wamp server is..why is that so..pls help me..thanks

Submitted byShouvro (not verified)on Wed, 01/08/2014 - 01:12

This is a nice and help full tutorial. could u tell me how to add picture in this project using upload command

Submitted bypushpendra (not verified)on Thu, 01/30/2014 - 17:41

i already make database and table, and also fields, after that it only shows like this "Products (Manage)", when i click "Manage" since that's the only things that is clickable, it returns on the the localhost, where wamp server is..why is that so..pls help me..thanks

Submitted bySandesh1 (not verified)on Wed, 08/27/2014 - 17:40

I'm new in codeigniter please help me i cant understand how add_product and edit product view are called
Please give reply i;m waiting for your reply

Submitted byR.Kathirvel (not verified)on Thu, 08/28/2014 - 15:44

hi
i got following error

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: core/Loader.php

Line Number: 346

wat can i do ? can u help me

Submitted byG.Ahmed (not verified)on Mon, 02/02/2015 - 15:25

Hi,
I am new to CodeIgniter ( in fact PHP ), I want to build a Master-Detail application ( like Department as Master and Employees as Detail ), I failed to find some examples/samples for it. Can you please inform me about is it possible using Codeigniter? if yes, is there any guide lines or sample/example to learn and achieve it? so please inform and give a link.
thanks with regards.

Submitted bysarah333 (not verified)on Tue, 05/19/2015 - 16:35

In "manage_products" it states:

echo anchor('product/delete/'.$product_id, 'Delete', array('onClick' => "return confirm('Are you sure you want to delete?')"));
?>

*****where is the product/delete in the zip folder? i cant seem to find it.*****

Submitted byAnonymous (not verified)on Fri, 01/27/2017 - 10:40

how to run it??

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.