Chapter 9 Building the Shopping cart Objective Creating Shopping cart using session Variable. Creating a shopping cart using a database table. Use the.

Slides:



Advertisements
Similar presentations
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
Advertisements

Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
CIS 451: ASP Sessions and Applications Dr. Ralph D. Westfall January, 2009.
Copyright © 2004 Pearson Education, Inc. Slide 7-1 E-commerce Kenneth C. Laudon Carol Guercio Traver business. technology. society. Second Edition.
LCT2506 Internet 2 Data-driven web sites Week 5. LCT2506 Internet 2 Current Practice  Combining web pages and data stored in a relational database is.
20/1/12.  Cookies are a useful way of storing information on the client’s computer  Initially feared, when they first appeared and were considered a.
XP Tutorial 9 New Perspectives on JavaScript, Comprehensive1 Working with Cookies Managing Data in a Web Site Using JavaScript Cookies.
1 Chapter 8 Object-Based Programming in VBA. 8 Chapter Objectives Declare and use object variables Create procedures that use built-in form methods Find.
ASP.NET Programming with C# and SQL Server First Edition
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Preventing SQL Injection ~example of SQL injection $user = $_POST[‘user’]; $pass = $_POST[‘pass’]; $query = DELETE FROM Users WHERE user = ‘$user’ AND.
131 Agenda Overview Review Roles Lists Libraries Columns.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Chapter 9 Using the SqlDataSource Control. References aspx.
CHAPTER 12 COOKIES AND SESSIONS. INTRO HTTP is a stateless technology Each page rendered by a browser is unrelated to other pages – even if they are from.
Database 20/2/12 Connection. 
1 Tutorial 2 ABC Web site. Objective Learning web applications design Conducting assumed business logic online Connecting the Database with the web pages.
Welcome to Century Equipment’s Shop Online Website! This presentation will highlight some of it’s key features.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
Online Shopping JavaScript project for CS 175 JavaScript for Web Development, Spring 2009 By Sita Akella.
JavaScript, Fourth Edition
Your Name Here See Page Notes for Info about Hyperlinks.
SHOPPING CARTS CHAPTER 19. E-COMMERCE Typically, an e-commerce site will have public pages and admin pages.
Microsoft FrontPage 2003 Illustrated Complete Finalizing a Web Site.
COMP3121 E-Commerce Technologies Richard Henson University of Worcester November 2011.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Week seven CIT 354 Internet II. 2 Objectives Database_Driven User Authentication Using Cookies Session Basics Summary Homework and Project 2.
Drinking Water Infrastructure Needs Survey and Assessment 2007 Training.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Microsoft ® Office SharePoint ® Server 2007 Training Excel Services II: Requirements, recommendations, and permissions [Your company name] presents:
Lecture Note 10: Simple Database Techniques. Introduction –Database System –Access, SQL Server and others. –Microsoft Access - Interacting with this databases.
Triggers A Quick Reference and Summary BIT 275. Triggers SQL code permits you to access only one table for an INSERT, UPDATE, or DELETE statement. The.
Cookies Web Browser and Server use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website it is required to maintain.
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
June 23, 2001Database Creation Review and Exercises1 Database Creation Review 10: :30 Team Building Exercise ……………………….. John 10: :30 Database.
Creating Databases Local storage. join & split Classwork: show 1 table application. Share designs for oscars application. Adaptive select. Homework: [Catch.
ActiveX Data Objects (ADO) is Microsoft’s latest database object model. The goal of ADO is to allow VB developers to use a standard set of objects to refer.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
Cookies and Sessions IDIA 618 Fall 2014 Bridget M. Blodgett.
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
 Empowers to your customer  Product Rating and its Management in Ecommerce Framework  Product Reviews and Management: Collecting customer opinion about.
Cookies By: Kendra Alvarez. Concepts of Cookies Cookies are pieces of information generated by a Web server and stored in the user's computer, ready for.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
Computer-made Cookies Presented by Helal Lutfi. What is a Computer Cookie?  A small text file which contains a unique ID tag.  Placed on your computer.
CSCI 6962: Server-side Design and Programming Shopping Carts and Databases.
1 ADO Activex Data Objects. 2 ADO ADO allows users to access data easily from many existing databases (such as Access or Paradox) From ODBC compliant.
Navigation: If the tutorial opens up in your web browser, simply click your mouse to advance to the next slide. Use the “Backspace”
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
ADO & Recordsets. ADO Description & History  ActiveX Data Objects  History  1991 ODBC  Data Access Objects (DAO) for VB developers (JET)  Remote.
SQL Triggers, Functions & Stored Procedures Programming Operations.
COOKIES Gloria Soria Network Security COSC 356. What is a Cookie? A cookie is a piece of text that a Web Server can store on a user's hard disk. Cookies.
© Copyright 2012 Hidaya Trust (Pakistan) ● A Non-Profit Organization ● / www,histpk.org Hidaya Institute of Science & Technology
An introduction to JDM Pro Release 2.0
ASP.NET Programming with C# and SQL Server First Edition
ADO VBA Programming in Access
Creating Databases Local storage. join & split
ActiveX Data Objects (ADO)
INT213 Updating the Database.
Latest Updates on BlackHawk Mines Music : Privacy Policy
Cookies BIS1523 – Lecture 23.
ISC440: Web Programming 2 Server-side Scripting PHP 3
Web Systems Development (CSC-215)
Building Web Applications
Chapter 2 Interacting with the Customer
Web Programming Language
MIS2502: Data Analytics MySQL and MySQL Workbench
Chapter 10 Checking Out Objective: Understanding Transaction.
Presentation transcript:

Chapter 9 Building the Shopping cart Objective Creating Shopping cart using session Variable. Creating a shopping cart using a database table. Use the native methods of the ADO to add, delete & update records in a recordset.

Using session Variable to create a Shopping cart Every products selected by the customer is add to a cart called shopping cart. One way to create shopping cart is by assigning an array to session variable. New items can be added o a shopping cart or existing items can be removed. This isn’t the best method of creating shopping cart bcoz the shopping cart relies on session variables & sessions variables are notoriously unreliable.

Contd… When the visitor first arrives at a Web site that uses Session variables, the Web Server adds a cookie to the visitor’s browser that tracks the visitor as he moves from page to page. When the session variable is created, this cookie is used to associate the variable with the proper user. If, for whatever reason, the cookie cannot be created on the user’s browsers, the session variables won’t work

Reasons that prevent cookie from being added to a user’s browser. Some older browser simply don’t support cookies. The recent browsers provide an option to accept or refuse cookies. The user’s cookie file may be corrupted. They time out after a preset period o time [default 20 min]. Advantage is you need not force the customer to register or log in before adding items to a shopping cart.

Using Database table to create a shopping cart First create a table.. Let us create a table named cart and the following is the schema: Cart_id Cart_userid Cart_productid Cart_quantity

Contd… As the user selects the product the registration form /log in form is displayed to accept the user’s details along with credit card details. Every product selected is added to the table just created. Shopping cart created here is permanent. Doesn’t rely on the properties of a user’s browser. Not a single cookie is used.

Native ADO Methods This is the second method of using the ADO o work with a database. Native methods of ADO are used to modify database records instead of using the ADO to pass SQL strings to a database. There is no need of alternative method but in certain situations it is more convenient. Multiple records in a database table can be updated easily using native methods of ADO.

Creating Updateable Recordset To modify the records in the Recordset, you must open the Recordset in such a way that it is updateable. By default the Recordset is read only. You can open a modifiable Recordset by changing the Recordset’s LockType property. Statement to open record set: RS.LockType=adOpenOptimistic Results in the least interference with other users and is least likely to cause database deadlock.

LockType Property values adLockReadOnly adLockPessimistic adLockOptimistic adLockBatchOptimistic