Simple Inventory System Using PHP/MySQL

Submitted by: 
Visitors have accessed this post 374657 times.

I developed this code to those beginner programmer who found difficulties in creating their inventory system using php/mysql. The feature of this system are, it generates daily inventory report, secure login because i use md5 encryption for login and registration . It also generate reports such as daily, weekly, monthly, and yearly. This system has many features not just the features written above. To try this system just download and run this system. If you have question, suggestion or anything, just leave comment and it's my pleasure to entertain your comments.

database name: liveedit

username: admin
password: admin

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 for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


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.


hey i have imported the database and replace every where mysql to mysqli after doing all these i am having this error username missing and password is missing

Thanks ok well thanks

Excuse me are you using xammp because i use xammp for my project

anyone can please help for:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\inventory\inventory\inventory\db.php:6 Stack trace: #0 C:\xampp\htdocs\inventory\inventory\inventory\login.php(6): require_once() #1 {main} thrown in C:\xampp\htdocs\inventory\inventory\inventory\db.php on line 6

Notice: Undefined index: date in C:-\inventory\inventory\tableedit.php on line 173 i didn't get what is the problem here and one more thing is here in inventory column the date is automatically changes which means the date is updated when we open the system. rectify and clarify me sir......its good coding. thank you so much

muneendra k

sir, send me the modules and system requirements to this project( UML diagrams and module descriptions). THANK U

muneendra k

do you have a boyfriend?

Error messages coming up when I tried logging

thanks so much i hope the project will help me greatly...

very good best !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

why is the log in broken? its just saying oops something went wrong? help me please

Hi argie,can you please provide the report of your project on inventory management.that can help to understand the project easily..
Thank you

I've error everytime I log in..
The error is :

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\inventory\inventory\db.php:6 Stack trace: #0 C:\xampp\htdocs\inventory\inventory\login.php(6): require_once() #1 {main} thrown in C:\xampp\htdocs\inventory\inventory\db.php on line 6

Can anyone fix this error for me? God bless you..

date error:173
daily sales error:215
qnty sold error:207

I have help for php

mayroon bang code para sa delete product??

nice sharing, keep it up

I dnt knw how to run the project please help me

Hi Argie,

Just looked at the code and I liked it.
I head a bit of headwind working through all the errors but with 2 hours if coding, all is working properly (at least for me :) ).
The code is nice and easy to read/adjust, but if I may, I would like to make some suggestions:
- for the Notice error: 'undefined index id' that everyone is complaining there are two simple mechanisms to put in place to make sure it doesn't show in the browser:
1. In index.php put the following lines:
echo '<ul>';
echo '<li>'." Registration Success You can now login ".'</li>';
echo '</ul>';
Normally this would not show if the error reporting level is set to low, so ...

2. Instruct users to set a lower error logging level like E_STRICT or E_ERROR or to exclude notice with ~E_NOTICE.

I would not suggest method 2 especially when you are in development mode :).

- mysql statement is deprecated in MySQL 5 so my suggestion is to use mysqli statements instead. This worked for me.

All in all, good code and really good effort. Keep on coding.

for sure, galing lang itong codes na ito sa ibang website, kya ignore lang ang gngwa instead of debugging the errors..

Hmmmm... Nice Keep up to help others... at same time you gats update your scripts...

I want to learn more on this

its not working . login error !

If you are having login error, you might want to check the index.php to login.php to db.php

check if all the code is connected to your database.


argie thanks for this kindness
i will check it out later


sir, how can i add a sold items.. it won't work if i click the row .. in your codes

if you are able to click the row and able to create input, all you have to do is refresh the page. thats the only flaw of this inventory sys. :)

ahhm... sir , how can i add a sold items ???
when i click the row it won't work.. plzz . help me .

sir bakit hindi ko po ma import yung database
eto poh yung lumalabas

SQL query:

-- --------------------------------------------------------
-- Table structure for table `inventory`

`item` VARCHAR( 100 ) NOT NULL ,
`qtyleft` INT( 11 ) NOT NULL ,
`qty_sold` INT( 11 ) NOT NULL ,
`price` INT( 11 ) NOT NULL ,
`sales` INT( 11 ) NOT NULL ,
PRIMARY KEY ( `id` )

MySQL said: Documentation

#1017 - Can't find file: 'inventory' (errno: 2)???

help poh newb lang poh kc ako sa php

sales error i found so what are the code for sales

- in original code :

//Start session

- in login.php please edit like this
//Start session

you must place code on the top, cannot any space.

Error when trie to loging

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at login.php:3) in login.php on line 5

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in login.php on line 55

Warning: Cannot modify header information - headers already sent by (output started at login.php:3) in login.php on line 61

dude u save me, thumbs up

Am short of words what more can I say than "Thanks so much..."?

I can not add items thorough the additem button..? please help

when i log in and set the usernama and password to admin. its a message that said something went i fixed it? pls help me.... pls

bakit hindi po ako maka log-in???,,,,query failed po yung lumalabas tapos sa registration,,pag nag register cannot add another user yung lumalabas???,,,please pm me @ [email protected]

For those with errors on line 283/284, you need to select a date range first.
Working fine here, with the exception of a few typo's which had to be changed to reflect the names in the corresponding tables.

Thank you

hi eto na lang po yung problem ko sa tableedit.php
Notice: Undefined variable: a in C:\xampp\htdocs\inventory\tableedit.php on line 283

Notice: Undefined variable: b in C:\xampp\htdocs\inventory\tableedit.php on line 283

anu po gagawin ko para matangal yung msg na yan tnx u po

pde po bang pahinge ng copy ng documentation ninyo jan tnx u ... kung ok lng po isend ninyo na lng sa y.m ko po na [email protected] tnx u

bakit po hindi ako maka log in? Opps some thing went wrong po ung lumalabas... I need ur help po...

username and password not found..

I would like to thank you personally. This is a big help for me learning php

sir panu ko po mah run ung gawa ninyo ?

it works correctly.first of all you have to import mysql database into the server.then type username and password.

i can't access it...i already imported the sql into myphpadmin...can't login into the system...

Unable to access db. After login shows the page "Opps some thing went wrong" please advise.

sorry i'am not accesss your progrem

I am very new to this...Where do you put the folder with all the files???

I am using phpmyadmin

i cant work with it

i import sql file with phpmyadmin and run script but when i loged in the browser said "Query failed"

Notice: Undefined index: id in C:\wamp\www\inventory\index.php on line 49


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.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.