title: Function session_register() is deprecated
body: <p>I use the following script as my check login and login:</p>
  <pre><code>&lt;?php
          
     include('../db_connections/aardb_conn.php'); 
     session_start(); 
     
           #***********************************
           # get info from form.
           #***********************************
          
              $myusername=$_POST['email']; 
              $mypassword=$_POST['pass']; 
              
               
                   $sql=&quot;SELECT * FROM users WHERE email='$myusername' and password='$mypassword'&quot;;
                 
        $result=mysql_query($sql, $db_conn);
        $count=mysql_num_rows($result);
  
         if ($count==1)
         {
           session_register(&quot;my_username&quot;);
           session_register(&quot;userid&quot;);
           $row = mysql_fetch_assoc($result) ;
           $_SESSION['my_username']= $row[fname].&quot; &quot;.$row[lname] ;
           $_SESSION['userid']=$row[autoid] ;
           
            mysql_free_result($result);
                
                header(&quot;location:../account.php&quot;);
               }#end of if
          else 
             {  
                header(&quot;location:../attempt.php&quot;);
          }#end of else
  ?&gt;
  </code></pre>
  <p>But I get the following error:</p>
  <blockquote>
  <p>Deprecated: Function session_register() is deprecated in /home/content/80/11429180/html/admin/logs/checklogin.php on line 35</p>
  <p>Deprecated: Function session_register() is deprecated in /home/content/80/11429180/html/admin/logs/checklogin.php on line 36</p>
  <p>Warning: Cannot modify header information - headers already sent by (output started at /home/content/80/11429180/html/admin/logs/checklogin.php:35) in /home/content/80/11429180/html/admin/logs/checklogin.php on line 43</p>
  </blockquote>