Add/Edit/Delete Using CodeIgniter

Submitted by: 
Language: 
Visitors have accessed this post 65207 times.

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

how to run it??

In "manage_products" it states:

<?php
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.*****

thank you so mch for this script

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.

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

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

its work but when i click to add/card its show no file exits

nice exmpl...........best of scratch level.

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

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

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

Yes
I am also having this problem

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.

really great work sir and thanks for the code

PLEASE ADD DATABASE FOR WORKING PROPERLY

where is database file???

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.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.