Well, with but six or seven lines of subroutine, putting the sub call in the main section, and the tiniest tinkering, the program is now - PROPERLY - updating the stock record, building carts, and handling the page so that there aren't any just-run-out-of cards that show up with a zero count.
Now, there's the security issue and the confirmation script. (In all honesty, I don't expect the confirmation script to take too long. Remove checkbox, name, amount, number, a little multiplication...should be a lot less hairy than this thing has been. Plus, I've written the update subs and all - most of the script is already written.)
The security issue is another ball of wax. I can't deal with it right now, though - I have to go make sure the phone doesn't get disconnected. (Lovely, lovely bills.
(chromatic: I didn't miss what you said, I'm just so happy that things are working that I don't want to attempt to implement it just yet. I'm sure that I'll regret the decision eventually, because what you describe seems to take fewer lines than my stuff. Thanks again, btw