Are all these steps necessary with prepared statement? Are all these steps correct and necessary?

&lt;?php
if (isset($_SESSION['userID'])) {
    $userID = $_SESSION['userID'];
    $stmt = $mysqli-&gt;prepare(
       "SELECT usergroup, firstname FROM tbl_users WHERE userID = ? ");
    $stmt-&gt;bind_param('i', $userID); 
    $stmt-&gt;execute();
    $stmt-&gt;store_result();
    $stmt-&gt;bind_result($usergroup, $firstname);
    $stmt-&gt;fetch();
    $_SESSION['usergroup'] = $usergroup;
    $_SESSION['firstname'] = $firstname;
    $stmt-&gt;close();
}   
?&gt;
More or less, they are... I was using get_result and fetching object more often, but if you want to have the results bound directly to variables, your code is what you need.

By the way, consider using some ORM. I'm using Doctrine2 for my PHP stuff and I'm very satisfied with it