Trying to create a form in php the link doesn't seem to work

Well you can’t put links, <p> tags etc inside select options. The select should be in a form tag and the select should have a name attribute. This sample has the form action attribute pointing to the same page and I assigned the id as the option value. I’m sure you have other code on your page, but at the TOP before output to the browser you can check for the POST and use a header to direct user to the details page. This is just a sample based on what you have.

<?php
if(!empty($_POST['section'])):
    header("location: details.php?id=".$_POST['section']); 
    exit;
endif;
?>
<html>
<body>
<div id="content" class="content">
        <div id="select1" class="select1"> 

        <?php 
        if(!empty($msg)){
            echo "<h3>$msg</h3>";
        }else{ ?>
        <form action="" method="post">
        <select class="section" name="section" onchange="this.form.submit()">
        <option value="">-</option>
        <?php
        while($row = $result->fetch_assoc()) { 
        ?>

                <option value="<?php echo $row['id']; ?>"><?php echo $row['firstname']; ?> <?php echo $row['lastname']; ?>  <?php echo $row['email']; ?></option>

        <?php     
        } //end loop 
        ?> 
        </select>
        </form>
        <?php } ?>

            
            

        </div> <!-- end select1  -->
        
        <div id="select2" class="select2"> 
        
        
        </div> <!-- end select2  -->
    </div> <!-- end content-->       
    
</body>
</html>