A simple system to track package using mysql and python
This package tracking system works on two databases. One database holds the details about the customer/user and the other database hold the package information and status of every user. Those two databases are named userinfo and packageinfo :-
userinfo ^ packageinfo ^The code consists of 4 sub parts and 1 main script which holds them together.
The first sub part is for customer registration, it takes the details from the customer and saves those into the db. Here the customer also decides their username and password. Each username should be unique to one customer and it is used for identification and logging in. It takes details such as username, name, phone number, address and password.
The second sub part consists of the admin input script. This script is for the admin and the admin can update the package information database using this script. The admin is responsible for updating the delivery status of the products.
The third part consists of user login. This part prompts the user to input their login credentials and return a flag after verifying those credentials. It returns ‘0’ if the username doesn’t exist in the database, ‘1’ if the username exists but the password for it is wrong and finally ‘2’ if both username and password is correct.
The fourth part is for extracting the details from the package information database. This part interacts with the login script and returns the package details of the user only if the login script returns 2.
Finally the main script is used to prompt the user for registration or login and connects all the 4 parts together to work as a single application.