var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Dynamic Arrays (shopping cart)
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
Just ran another SQL statement with an approriate WHERE clause.