This project is developed as a part of six week¶s industrial training programme. It explores the design and development of PHP based Graphical User Interface Application with a Database support. The main purpose of shopping cart is to make your business do, across the world by serving facilities to your potential customers of purchasing your product with a wide range of payment options from any where they are. At the same time, all your responsibility on selling side either product display, pricing, product explanation, billing, discounts, cost calculation, delivery and even communication with entire string connected with your business are performed with a great amount of accuracy and efficiency by the shopping cart. The Shopping Cart system works like the name suggests. Firstly, the customer must choose the product desired from the source. Once this step is done, an option to add the product to the cart will be given, this step will assure that the item you desire will be bought. Once the customer has finished browsing for other potential purchases and has decided that the product he chose previously is the one that he wants to buy, the user must then follow the steps provided by the website in order to fulfill the transaction (normally requires an active account and/or registration method). Lastly, the order will then be sent to the desired address at a predicted date, which may alter depending on the speed of the process. Online stores are usually available 24 hours a day, and many consumers have Internet access both at work and at home. Other establishments such as internet cafes and schools provide access as well. A visit to a conventional retail store requires travel and must take place during business hours.



I take this opportunity with much pleasure to express my sincere gratitude to my college for granting me with opportunity to do this Six Weeks Industrial Training at NIIT. I am also grateful to Mr. Dinesh Asija, Centre Head, NIIT Patiala for guidance and encouragement in completion of this Training Program. I am also thankful to my Training Instructor for his support for deciding, designing and completing the Training Project using PHP Technology. This project bears on imprint of many people. He showed me different ways to approach a research problem and the need to be persistent to accomplish any goal.
I express my sincere gratitude and thankfulness towards Prof. Harjit Singh (Training & Placement Officer, MGC-FS) for their guidance and support.

Last but not least I wish to avail myself of this opportunity, express a sense of gratitude and love to my friends and my beloved parents for their manual support, strength, and help for everything.

Brahmjot Singh B-TECH CSE (5th Sem) 90630307661 RIMT-MAEC MALERKOTLA


Company Profile

NIIT is a leading Global Talent Development Corporation, building skilled manpower pool for global industry requirements. The company which was set up in 1981, to help the nascent IT industry overcome its human resource challenges, has today grown to be amongst world¶s leading talent development companies offering learning solutions to Individuals, Enterprises and Institutions across 40 countries.

Global Learning Solutions
NIIT¶s wide spectrum of services portfolio, comprising a mix of global solutions with a local flavor, are prevalent across varied domains. Driven by its vision of developing global talent, NIIT is helping to build a pool of employable, industry-ready professionals globally. NIIT together with Element K is the first and the best choice for comprehensive learning solutions, worldwide.

Global Delivery System
NIIT¶s extensive delivery umbrella spread across 40 nations covers even the remotest parts of the globe and market segments. We have been providing learning solutions to individuals, institutions and enterprises by blending cutting-edge technology and education. Further strengthening NIIT's vision of developing global talent, are its enduring relationships with leaders in the technology and content space. NIIT works closely with global leaders such as Adobe, Cisco, Citrix, EMC, Intel, Microsoft, Oracle, SAS, Sun and provides training on their platforms.

Awards and Acknowledgements
NIIT is ranked as µTop Training Company 2008¶, by Dataquest magazine, India¶s leading ICT publication group Cyber media. Ranked amongst µIndia¶s Most Trusted Services Brand¶ in a survey by India's one of the leading financial daily- The Economic Times Brand Equity Survey, in 2008.

The Industry-endorsed GNIIT curriculum has proved to be a trail-blazing 12-month Professional Practice offering. Our Franchisee network has earned us the soubriquet of µMcDonalds of the Training sector¶. we are always looking out for creative.4 Innovation and Leadership Innovation has remained a growth catalyst for NIIT. leading us to think ³out-of-thebox. both count. result-oriented individuals who are ambitious. At NIIT we believe that our growth is the derivative of the growth of each one of us.´ and bring to market products and training solutions that have often been global firsts. Career at NIIT At NIIT you can build yourself and your career. To us.com 91-124-4293402 . To achieve our vision of Leadership through Global Talent Development. love challenges and have a passion to excel! Enquiries niitCareers@niit. One of the innovative solutions offered by NIIT is the synchronous learning based Executive Management programs from India¶s top B schools through NIIT Imperia. talented. We have constantly transformed unique ideas into ³on-the-ground´ solutions that bring real benefits to learners.

This enables engineering students to go through complete software development life cycle. graded sequence of experiential learning activities. During the training period. The project helps the students to satisfy the university guidelines along with technical learning & experience.5 Introduction to Training NIIT Provides Industrial Training Program is committed to give you high-end IT education. the goal of the training program is to provide the world with skilled human resources who are competent to practice and provide solutions in an ever-changing technology world. So. This training program is also supported with Project Training Program. We here at NIIT realize that only trained professionals get selected for most IT jobs. The Industrial Training program is designed in such a way that it insists upon developing the student's ability to think dynamically and to spread the logical ideas. NIIT mentors provide an appropriate. We guide the students to evolve into technical advancements. These Industrial Training programs are a unique combination of Technology learning and real life technical projects. .

The Shopping Cart system works like the name suggests. the user must then follow the steps provided by the website in order to fulfill the transaction (normally requires an active account and/or registration method). The main purpose of shopping cart is to make your business do. . the customer must choose the product desired from the source. discounts. Once the customer has finished browsing for other potential purchases and has decided that the product he chose previously is the one that he wants to buy. Lastly. product explanation. all your responsibility on selling side either product display. cost calculation. At the same time. billing. this step will assure that the item you desire will be bought. the order will then be sent to the desired address at a predicted date. across the world by serving facilities to your potential customers of purchasing your product with a wide range of payment options from any where they are. It explores the design and development of PHP based Graphical User Interface Application with a Database support.6 Introduction to Project This project is developed as a part of six week¶s industrial training programme. Once this step is done. Firstly. which may alter depending on the speed of the process. delivery and even communication with entire string connected with your business are performed with a great amount of accuracy and efficiency by the shopping cart. pricing. an option to add the product to the cart will be given.

or coupons may be redeemed at the appropriate physical or online premises and their content reviewed to verify their eligility (e. finds a local store using locator software and picks the product up at the closest store. product category. and space. This is the method often used in the bricks and clicks business model. price. The tickets. The facts may include the product code. movies. With the onset of the Internet and e-commerce sites.g. the popularity of this service has increased. Product delivery Once a payment has been accepted the goods or services can be delivered in the following ways. ‡ ‡ ‡ ‡ . In-store pickup: The customer orders online. The customer details may include name. Shipping: The product is shipped to the customer's address or that of a customerdesignated third party. assurances that the right of admission or use is redeemed at the correct time and place. and for the correct number of uses). Printing out. or "at the door" pickup: The patron picks up pre-purchased tickets for an event. quantity. Will call. codes. such as a play... Drop Shipping: The order is passed to the manufacturer or third-party distributor. music. for the correct dollar amount. customer_id.g.7 Components A major component of a shopping cart system is a database that records facts about various transactions by customers as well as the details of various customers. COBO (in Care Of Box Office). phone no. gift certificates and coupons)..etc. who ships the item directly to the consumer. which allow customers to buy tickets online. or concert. or images. money. customer_password. sporting event. ‡ ‡ Downloading: This is the method often used for digital media products such as software. or emailing of such items as admission tickets and scrip (e. address. either just before the event or in advance. provision of a code for. bypassing the retailer's physical location to save time.

and many consumers have Internet access both at work and at home. online price comparison services and discovery shopping engines can be used to look up sellers of a particular product or service. though depending on the jurisdiction. Search engines. Shipping a small number of items. clerks are generally available to answer questions. Shipping costs (if applicable) reduce the price advantage of online merchandise. especially from another country. In a conventional retail store. Price and selection One advantage of shopping online is being able to quickly seek out deals for items or services with many different vendors (though some local search engines do exist to help consumers locate products for sale in nearby stores). Another major advantage for retailers is the ability to rapidly switch suppliers and vendors without disrupting users' shopping experience. visit the post office and pay return shipping. A visit to a conventional retail store requires travel and must take place during business hours. a lack of sales tax may compensate for this. Information and reviews Online stores must describe products for sale with text. Some retailers (especially those selling small.8 ADVANTAGES Convenience Online stores are usually available 24 hours a day. . is much more expensive than making the larger shipments bricks-and-mortar retailers order. Some online stores have real-time chat features. and multimedia files.. . fitting. or it is not what they expected ± consumers are concerned with the ease with which they can return an item for the correct one or for a refund. and then wait for a replacement or refund.. photos. whereas in a physical retail store.. or other experimentation). but most rely on e-mail or phone calls to handle customer questions. Consumers may need to contact the retailer. Other establishments such as internet cafes and schools provide access as well. In the event of a problem with the item ± it is not what the consumer ordered. Some online companies have more generous return policies to compensate for the traditional advantage of physical stores. high-value items like electronics) offer free shipping on sufficiently large orders. the actual product and the manufacturer's packaging will be available for direct inspection (which might involve a test drive.

demonstrations. on site observations. Responsible for managing customer communications and expectations. interviews. Development. Testing.9 SYSTEM ANALYSIS It is a detailed study of the various operations performed by a system and their relationships within and outside of the system. Program management. Responsible for the development process and for delivering the solution to the customer within the project constraints. Data flow diagrams. A key question is: What must be done to solve a problem? During analysis. Release management validates the infrastructure implications of the solution to ensure that it can be deployed and supported. product management gathers customer requirements and ensures that business needs are met. Product management also works on project communication plans such as briefings to the customers. Training experience and common sense are required for the collection of the information needed to do the analysis. questionnaires are system models and tools that are used in Analysis. Responsible for identifying and addressing all product quality issues and approving the solution for release. y y y y y y Product management. This role evaluates and validates design functionality and consistency with project vision and scope. marketing to users. data are collected on the available files. Responsible for developing the technology solution according to the specifications provided by the program management role. During the design phase. Responsible for smooth deployment and operations of the solution. and product launches. User experience. . decision points and transactions handled by the present system. Release management. Analyzes performance needs and support issues of the users and considers the product implications of meeting those needs.

5 gigabytes (GB) on installation drive. Setup Instructions Set up your computer according to the manufacturer¶s instructions. MySQL (open source database. PHP (A scripting language-Version 5.1. 450 megahertz (MHz). WampServer 2.10 Hardware Requirements Each computer must have the following minimum configuration. . CD-ROM or DVD drive. Software Requirements The following software is required to complete the procedures in this course.2. Super VGA (800 x 600) or higher-resolution monitor with 256 colors. ‡ ‡ Microsoft Windows 2000 or Microsoft Windows XP Professional Edition.0 software for Development purposes only. ‡ ‡ ‡ 3.30). 256 MB recommended. Microsoft Mouse or compatible pointing device. ‡ ‡ ‡ Pentium II class processor. All hardware should be on the Microsoft Windows XP or Microsoft Windows 2000 Hardware Compatibility List.0 compatible with Microsoft Windows comprising of programs such as Apache (Web Server).8). NOTE A DVD drive is required to install the Visual Studio WampServer Version 2.Version 5. 12x or faster recommended. 160 MB physical memory. which includes 500 megabytes (MB) on system drive.

and would like to use some advanced PHP features in your client-side applications you can also use PHP-GTK to write such programs. PHP has also support for most of the web servers today.11 Programming Language and Tools PHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. . ‡ Server-side scripting. generate dynamic page content. Solaris and OpenBSD). PHP is probably not the very best language to create a desktop application with a graphical user interface. and probably others. You can access the PHP program output with a web browser. such as collect form data. or as a CGI processor. This is the most traditional and main target field for PHP. PHP-GTK is an extension to PHP. ‡ ‡ PHP can be used on all major operating systems. The client would receive the results of running that script. generating HTML which is then sent to the client. You also have the ability to write cross-platform applications this way. But PHP can do much more. Command line scripting. or send and receive cookies. You need to run the web server. This type of usage is ideal for scripts regularly executed using cron (on *nix or Linux) or Task Scheduler (on Windows). The PHP parser (CGI or server module). viewing the PHP page through the server. Writing desktop applications. IIS. All these can run on your home machine if you are just experimenting with PHP programming. Mac OS X. but would not know what the underlying code was. and many others. You only need the PHP parser to use it this way. a web server and a web browser. RISC OS. This includes Apache. There are three main areas where PHP scripts are used. And this includes any web server that can utilize the FastCGI PHP binary. but if you know PHP very well. with a connected PHP installation. What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server. like lighttpd and nginx. so you can do anything any other CGI program can do. including Linux. not available in the main distribution. You need three things to make this work. You can make a PHP script to run it without any server or browser. Microsoft Windows. PHP is mainly focused on server-side scripting. PHP works as either a module. many Unix variants (including HP-UX.

an application interacts with an object through its interface. and so on. Objects should only interact with other objects through their public methods and properties. a database connection. the application can continue to interact with the component. and contains all of the data and exposes all of the functionality required to fulfill its purpose. objects are cars. There are two principal ways through which polymorphism can be provided: interface polymorphism and inheritance polymorphism. exposes the same public interface. In other words. Objects are created from a template called a class. as well as all of the functionality that works with that data. such as a Truck object or a Sports Car object. For example. a control such as a button. Each object is a complete functional unit. An object is a programmatic construct that represents something. or any of a number of other constructs. a Driver object can interact with a Car object through the Car public interface. Put another way. Objects are programmatic constructs that represent packages of related data and functionality. which consists of its public properties and methods. Each of these items exposes specific functionality and has specific properties. even if implementation of the interface was completely rewritten between versions. laptop computers. bicycles. Thus. . As long as this interface remains constant. In your application. objects should contain all of the data they require. thus. If another object.12 Object-Oriented Programming and Polymorphism Programming in the PHP environment is done with objects. In the real world. Objects are self-contained and expose specific functionality to the rest of the application environment without detailing the inner workings of the object itself. The internal data of an object should never be exposed in the interface. polymorphism allows methods and properties of an object to be called without regard for the particular implementation of those members. an object might be a form. the Driver object can interact with them without regard to the specific implementation of that interface. Encapsulation is the concept that implementation of an object is independent of its interface. fields rarely should be Public (public). Polymorphism is the ability of different classes to provide different implementations of the same public interfaces. The ability of programmatic objects to represent real-world objects is called abstraction.

PHP is a scripting language that can manipulate information held in a database and generate web pages dynamically each time content is requested by a browser. Equivalent packages are MAMP (for the Apple Mac) and LAMP (for the Linux operating system). MySQL and one of PHP. . such as phpMyAdmin which provides a graphical user interface for the MySQL database manager. Perl or Python. WAMP is an acronym formed from the initials of the operating system Microsoft Windows and the principal components of the package: Apache. or the alternative scripting languages Python or Perl.13 WampServer 2. Apache is a web server.0 WAMPs are packages of independently-created programs installed on computers that use a Microsoft Windows operating system. MySQL is an open-source database. Other programs may also be included in a package.

and to change the values of an existing record. it is important to be able to generate SQL statements to interact directly with a database. you might want to dynamically build SQL statements in response to user input to retrieve a custom set of rows. For example. Relational Database Management System (RDBMS) uses established relationships between the data in a database to ensure the integrity of the data. which is used to present and manipulate data. A client/server database management system consists of two components: a front-end component (the client). to delete records from a database. and protect t he database. Database Support using SQL Server Microsoft SQL Server is a client/server database management system. though. These relationships enable you to prevent users from entering incorrect data. the SQL server can process the query for you and send the results to your workstation. When you query a database. Thus. Using SQL statements behind the scenes. retrieve. SQL can be used to retrieve and filter records from databases. Structured Query Language (SQL) is a standardized set of commands used to work with databases. and a back-end component (the database server). using SQL Server enables you to reduce the traffic on your network. if you query a database on a file server. the file server must send the entire database to your workstation so that your workstation can process the query. In contrast. which is used to store. PHP handles most of the actual database interaction for you through the classes contained in a data provider.14 Database Layer: Data Access Using MySQL Structured Query Language (SQL) is the universal language of relational databases. to add records to databases. In some cases. .

Clients use applications such as the SQL Server utilities. you will find components of its architecture on both the client and the server itself. Client Architecture On the client. and a Net-Library. Microsoft Access. The database interface consists of an application programming interface (API) and a data object interface. The client application uses a database interface to connect to and access resources on the SQL server. the SQL Server architecture consists of the client application. or a custom application to access the SQL Server. SQL Server supports two classes of APIs: Object Linking And Embedding Database (OLE DB) and . a database interface.15 SQL Server Database Architecture Because SQL Server is a client/server database management system.

In contrast.16 Open Database Connectivity (ODBC). ODBC can be used to access data only in relational databases. the ODBC API uses calls to access the SQL Server directly via the Tabular Data Stream (TDS) protocol. In contrast. Active Server Pages. if you use the OLE DB API. You use Net-Libraries to prepare read and write requests for sending by the appropriate network protocol. if you use the ODBC API. IPX/SPX (NWLink). you use ActiveX Data Objects. Server Architecture On the server. Banyan Vines. and the Microsoft Internet Explorer scripting object model. The relational engine is responsible for parsing and optimizing queries. The OLE DB API uses the Component Object Model (COM)-based interface and is modular. . and AppleTalk ADSP. Specifically. The server's Net-Library accepts connection requests from a client's Net. The SQL Server database engine actually processes client requests.Library. Visual Basic for Applications. You can configure both the client and the SQL server to use more than one Net-Library. Named Pipes. Note: Both the client and the server must have a Net-Library in common. Open Data Services. the SQL Server architecture consists of the SQL Server database engine. Remote Data Obj ects (RDO) enable you to encapsulate the ODBC API. You can use RDO from Visual Basic and Visual Basic for Applications. At the lowest layer of the client architecture. ActiveX Data Obj ects (ADO) enable you to encapsulate the OLE DB API commands in order to reduce application development time. As a programmer. the server receives client requests and responds through Open Data Services. you connect to the SQL server by using a NetLibrary. You can use ADO from Visual Basic. While OLE DB can be used to access many different types of data sources. For example. The storage engine is responsible for retrieving and modifying data on your server's hard drives. Open Data Services manages clients' connections to the server. the relational engine retrieves data from the storage engine. and the server's Net-Library. SQL Server supports two data object interfaces: ActiveX Data Objects and Remote Data Objects. the API you choose dictates which data object interface you can use (and vice versa). you must use Remote Data Objects. The database engine consists of two components: the relational engine and the storage engine. SQL Server supports TCP/IP.

Creating the functional specification. user requirements. testing. Creating the development. Creation of the master project schedule. Creation of a functional specification that describes the requirements that must be met by the solution. It also includes the construction of programs and program testing. Design process The team performs the following key tasks during the design phase: y Developing the solution design and architecture. Identification of and planning for the tasks that will be performed by the project team. Completion of the milestone approval process. dependencies. Second input data and master files have to be designed to meet the requirements of the proposed output. This schedule consists of milestone-based schedules for each of the team roles in the project team. y y y y y . Finally details related to justification and estimate of the impact of the candidate system of the user and organization are documented and evaluated by management as a step towards implementation. Identification of business requirements. The master project plan also includes items such as the approach.17 SYSTEM DESIGN The term design refers to the technical specification that will be applied and implementing the candidate system. and technologies and the use of this information to design a proposed application model. Creation of a separate environment in which to develop and test the solution. This environment is independent of the environment in which the solution will finally be deployed. Documentation of the results of completing the tasks performed during the planning phase. and the consolidation of these plans into a master project plan. The operational phases are handled through program construction and testing. Closing the planning phase. including the list of programs needed to meet the system objective and complete documentation. Creating project schedules. and assumptions for the solution. Developing project plans. The first step is to determine how to output is to be produced and in what format samples of output are also presented. and staging environments.

data stores. Data Flow Diagram also known as µBubble Chart¶ is used to clarify system requirements and identifying the major transformations that will become programs in system design. .18 Data Flow Diagrams Data Flow Diagramming is a means of representing a system at any level of detail with a graphic network of symbols showing data flows. So it is the starting point of the design phase that functionally decomposes the requirements specifications down to the level of details. Data Flow Diagram (DFD) uses a number of symbols to represent the systems. and data sources/destination. is shown on supplementary diagrams or in the data dictionary. Details that is not shown on the different levels of the data flow diagram such as volumes. etc. frequency. data store contents may be shown in the data dictionary. data processes. timing. For example.

19 Context level DFD: .

20 First level DFD: .

This environment is as similar as possible to the production environment. This task is completed before development begins.21 Development process During the developing phase. Development of the solution¶s core components and the extension of these components to the specific needs of the solution. and delivery of code and documentation. This process includes creating the code that implements the solution and documenting the code. Verification that all tasks identified during the envisioning and planning phases have been completed so that the team can begin developing the solution. The team performs the following key tasks during the developing phase: y Starting the development cycle. Developing the solution components. A series of daily or frequent builds that culminate with major internal builds that signify points when the development team is delivering key features of the solution. In addition to developing code. and the team enters a milestone approval process. the project team creates the solution. Building the solution. the team also develops the infrastructure for the solution. The solution is considered complete. Creating a prototype application. Completion of all features. Closing the developing phase. y y y y . Verification of the concepts of the solution design in an environment that resembles the environment to which the solution will be eventually deployed.

a diagnostic procedure is user to locate and correct errors in the program. or environmental factors also call for system enhancements. the programs are then run with live data. changes in organizational requirements. then changes have to be made. During the final testing user acceptance is tested. evaluation and maintenance begin. extensive user training may be required. Depending on the nature of the system. System testing checks the readiness and accuracy of the system to access. Hardware also requires periodic maintenance to continue to bring the new system to standards. test data are read into the computer and processed against the files provided for testing. Otherwise. If successful. If the new information is inconsistent with the design specifications. there is an aging process that requires periodic maintenance of hardware and software. POST-IMPLEMENTATION AND MAINTAINENCE: After the installation phase is completed and user staff is adjusted to the changes created by the candidate system. The importance of maintenance is to continue to bring the new system to standard. . site preparation and file conversion. update and review from new files. Like any other systems. Once the programs become available. followed by User training.22 IMPLEMENTATION: It is primary concern with the user training. User priorities.


24 Database Particulars Table Design Details ‡ dtu ‡ feed .

25 ‡ ecomm_customers ‡ ecomm_orders .

26 ‡ ecomm_products .

About us screen .27 Snapshots Home Screen The users gets to know about the various services available through this site. It the name of the store is µTHE AMAZING STORE¶. It gives access to a variety of products to the customer.

28 Contact us screen Login screen .

29 Feedback form screen Offers section .

30 Products section .

31 Product Selection Section .

32 .

33 Your order has been processed. Thank You for visiting! .

Implement File Class and Character Stream Class. Create Form Based GUI Application. Understand concepts of PHP. After Completing this Training Module. Implementing Inheritance and Interfaces. Manage databases with MySql. Implement the different conditional statements and looping statements. Create classes and objects and add methods to a class. we are able to: ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ ‡ Describe the concept and feature of object-oriented programming. Use the Layout Managers and Implement Event-Handling. Recognize Software Development Life Cycle. Implementing Exceptional-Handling. Create Multithreaded Applications.34 Conclusion This Training Module explained the basics of Object-oriented programming system and PHP. This module also explained the Core Technologies that are implemented for developing windows based applications using PHP. This includes an introduction to database management with SQL Server 2005. Understand Object-Oriented Analysis and Design. .

35 References BOOKS ‡ Learning PHP. By David Powers.google. and JavaScript: A Step-by-Step Guide to Creating Dynamic Websites. My SQL. Beginning PHP and MySQL: From Novice To Professional.net . WEBSITES ‡ ‡ www.com Php. By Robin Nixon ‡ ‡ PHP Solutions: Dynamic Web Design Made Easy.

36 .

Sign up to vote on this title
UsefulNot useful