simple code to set a session variable would like:
<?php $_SESSION['sessionName'] = "Session Value"; ?>
but I dont think this is going to help you very much.
let me ask a few questions and maybe we can get on the same track and i can give you more complete answers.
You are asking about setting a session when the user logs in, is the dealer_tbl you are referring to in the original question being used as your user table?
what are you using for Login, Security Assist? Or the Dreamweaver Authenticate user behavior?