I am at the moment trying to develop a web app with Dojo ( I am successfully developing it so far!)
I am using php at the back end (No I am not using Zend framework - I don't like he fact that eats memory) The gui and PHP are communicating to each other using JSON.
I was wondering (as I am not an expert at all) is there any way that whenever the client successfully authenticate (not using HTTP authentication BUT a custom log in screen) that I can create a session at the end of PHP? in some words, I want that the user once will authenticate successfully (therefore can access the main Panel or his/her profile) can go back to the website (the web app) without authenticate again UNLESS the user will LOG OUT. I am aware of cookies but the documentation is not clear on how to do that AND I am developing the back end with PHP, I am aware of sessions in PHP but I don't fully understand how exactly the server can save the user's session. Thank you all for your time :)
Well, as you have outlined you have two options: session and cookies.
Unless you want another different behaviour for some application-specific reasons, you can use the "remember me" method to differentiate between them.
So this way you create a new session to indicate that the user is logged in unless he ticks the checkbox, in which case you should go for cookies.
You can take a look at this screencast and see how they work: http://net.tutsplus.com/articles/news/how-to-build-a-login-system-for-a-simple-website/
Here's an example. The code isn't that great, but the idea is there.