Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am currently working on a little webshop and I need a good session handling for the shopping cart. I worked with PHP and I never used JavaScript, but what is the diffrence when working with session handling? What is the simplest possibility? Do I have to use cookies?

Does anybody know a good tutorial?

share|improve this question
2  
php.net is a good start. – STT LCU Apr 15 at 6:52

closed as not constructive by Bill the Lizard Apr 15 at 11:11

As it currently stands, this question is not a good fit for our Q&A; format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

2 Answers

up vote 0 down vote accepted

what is the diffrence when working with session handling?

PHP has session handling functions built into the language. JavaScript doesn't (although there are modules which add the functionality and writing your own is not particularly difficult.

Of course, that assumes server side JavaScript. There are client side options which can have similar effects to sessions, but sessions are fundamentally a server side technique.

What is the simplest possibility?

Cookies are the simplest way to track a session id.

Do I have to use cookies?

No. You can pass session ids through query strings and hidden input fields.

share|improve this answer
1  
Passing the session ids in the query string is the most insecure thing to do and should be avoided at all costs. – Damien Legros Apr 15 at 7:19
Ok, that's a good point to start with :) – muffin Apr 15 at 7:20

As far as I know, there is no such thing as a Javascript session. Javascript can handle cookies but that's not really the same. You should really stick with PHP it's safer and faster anyway.

I know this great website that helps me find tutorials, check it out here.

share|improve this answer
if there's something wrong then say so.. – Adelphia Apr 15 at 7:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.