Page 1 of 1

a basket, a textfile and a question?

Posted: Fri Jul 15, 2005 12:05 am
by harrisonad
Hi, I have been reading articles and tutorials about e-comerce scripts and they use either session or cookies, or combination of the two to store information about items added to cart.
Now, I am experimenting (or re-experimenting) on creating e-comerce site using textfiles.
Is this possible?
Is it advisable, or secured?
Thank you for any comment.

Posted: Fri Jul 15, 2005 12:41 am
by Burrito
don't see why it wouldn't be possible. I use a db for mine and tie it to sessions.

I have 2 tables (well actually lots more, but for the sake of this example, I'll just use 2).

one is my cart table which stores all of the user's information, and one is my item table that has the items put into the cart as well as the cart id from the other table.

I can add or remove items from the cart by simply inserting or deleting items from my items table.

the cart table has a field for the user id which ties to the session var I set for the user (this could easily be done with any other var type (form, url etc).

as for advisable, seems like too much work for not much gain for me.
secure? I'm not the security guru, maybe hit up Roja about that one but shooting from the hip, I'd think it'd be less secure than mysql or the like as you're writing to a text file...

8O