C#
  Home arrow C# arrow Page 3 - Data Handling with a Shopping Cart/PayPal ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
C#

Data Handling with a Shopping Cart/PayPal System
By: Tann San
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2006-06-20

    Table of Contents:
  • Data Handling with a Shopping Cart/PayPal System
  • The Shopping Basket
  • A further note on security
  • Payment

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Data Handling with a Shopping Cart/PayPal System - A further note on security


    (Page 3 of 4 )

    Any point within your system where a user has the opportunity to enter data should be strictly checked to ensure that they have not entered anything that could be used for an unintended purpose.  A common problem is SQL injection.  This is where somebody enters SQL code into an area of a site which then gets used inside the original SQL statement you intended to use. So say for the quantity field you had:

      "UPDATE tbl_basket SET quantity = " + quantity.Text + " WHERE user_id = " + user_id;

    If the customer entered 6 into the "quantity" text box and their login id was 230 then the above would look like:

      UPDATE tbl_basket SET quantity = 6 WHERE user_id = 230;

    If instead the customer entered:

      " 1 WHERE 1 = 1; DROP tbl_users; --"

    then the original statement would now look like:

      UPDATE tbl_basket SET quantity = 1 WHERE 1 = 1; DROP tbl_users; -- WHERE user_id =;

    so they complete the original statement with "1 WHERE 1 = 1;" and then proceeded to "Drop tbl_users;" which wouldn't be good.  Finally they commented out the remainder of the original statement.  This was just an extremely simple example.  Use your favorite search engine and look up "SQL Injection" and "String Sanitization" to learn more about methods to defend your sites.

    More C# Articles
    More By Tann San


       · I'm open to...
       · hey, nice work i must say!My problem is that even though i am directed to a page...
       · are both the pages on the same server and under the same domain name? if their not...
       · I can't run this proj plz tell me
     

    C# ARTICLES

    - Working with Dates and Times in C#
    - Generics, Dictionaries, and More
    - More About Generics
    - Working with C# Collections
    - Generics
    - C# and XML
    - Pointers and Arrays in C#
    - C# 3.0 Extension Methods
    - Overloading Operators in C#
    - Iterators and Nullable Types
    - Patterns and Iterators in C#
    - C# Exceptions
    - Methods in C#
    - Delegates and Events in C#
    - Advanced C#

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT