I started dabbling with sessions yesterday to some success. I created a page called accesscontrol.php, which basically allows me to restrict pages to user acccess only. If I place include("accesscontrol.php") on the top of each page I want protected, accesscontrol.php basically looks for a stored session, and if there isn't one, prompts for a username and password, verifies if the user/password exists in the database, and creates a session, opening up the protected page. All very cool, exactly what I wanted, etc.
However, I'm concerned about security. I have no "hacking" abilities or experience, so I don't really understand how it works. How safe are sessions? I'm encrypting entered password's with MySQL but I feel the form should perhaps be used on an SSL page. My hosting provider offers security by altering the URL of any page we want secure.
So instead of:
http://www.mydomain.com/form.php
I could type:
https://www.theirdomain.com/~myuser/form.php
and the page would be secure. But I don't want to secure every page that requires a user, rather just the submission forms. I'm not sure how to make it so if accesscontrol.php is called for, it pops up on the SSL, but otherwise the page pulls up normal. Does this make sense at all? Or do I even have to worry about this? Does phpbuilder log me in on an SSL? Does it matter?