# Shopping cart malfunction?

**URL:** <https://forum.kirupa.com/t/shopping-cart-malfunction/214993>\
**Category:** programming\
**Created:** [February 2, 2007, 7:15pm UTC](https://forum.kirupa.com/t/shopping-cart-malfunction/214993 "2007-02-02T19:15:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimmyC](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@TimmyC](https://forum.kirupa.com/u/TimmyC)\
**Post date:** [February 2, 2007, 7:15pm UTC](https://forum.kirupa.com/t/shopping-cart-malfunction/214993/1 "2007-02-02T19:15:19Z")

</div>

**php to SQL posting problem**  
I recently had a program written in php for e-commerce, but there seems to be a problem with the posting of the cart id to the SQL table. The designer is no longer available for questions, so I had hoped to get some help here. I have a brief knowledge of php, but just cant seem to track the problem down.

There are two tables used for the cart:

store\_shopping\_cart and  
store\_shopping\_cart\_items

Everything works fine until you try to add an item to the cart. It tries to enter a null value into store\_shopping\_cart\_items for the column shopping\_cart\_id

The shopping cart id obviously cannot be null or there could be major confusion between different customers.

I know you need more information and to look at the code to give me an answer, but there are many dependent php files (classes.php,common.php, etc.) I didnt want to post them all here and waste a bunch of space…

Could some1 contact me and help me track this problem down? I’d like to get the site up and working asap because its a much better design than our current site.

Thanks  
TimmyC  
[TimmyC@5thavenuebling.com](mailto:TimmyC@5thavenuebling.com)
