Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2005
    Posts
    30

    Unanswered: Dynamic Arrays (shopping cart)

    Hi Guys

    I am writing a page that adds a product to the users cart.

    I am trying to write it so that if the product is already in the database the user is given a warning and redirected. If not then it gets added to the database and the user can proceed.

    My problem arises when try and pull all of the product ID numbers out to check to see if it is already in the database.

    Do I need to put the id numbers in an array? If so how do I check through the returned variables to see if it exists.

    I have included a txt file of my code. Its a stripped down version so some bits are missing.

    Thanks in advance

    Elskan
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2005
    Posts
    30
    Fixed it.

    Just ran another SQL statement with an approriate WHERE clause.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •