title: Fatal error: Call to undefined function session_register()
body: <p>I'm new to php and was wondering if anyone could help me debug, the following error.
  Fatal error: Call to undefined function session_register()</p>
  
  <p>It occurs as I get a user to login.</p>
  
  <p>PHP </p>
  
  <pre><code>&lt;?php
  include("config.php");
  session_start();
  if($_SERVER["REQUEST_METHOD"] == "POST")
  {
  // username and password sent from Form 
  $myusername=addslashes($_POST['username']); 
  $mypassword=addslashes($_POST['password']); 
  
  $sql="SELECT id FROM admin WHERE username='$myusername' and passcode='$mypassword'";
  $result=mysql_query($sql);
  $row=mysql_fetch_array($result);
  $active=$row['active'];
  $count=mysql_num_rows($result);
  
  
  // If result matched $myusername and $mypassword, table row must be 1 row
  if($count==1)
  {
  session_register("myusername");
  $_SESSION['login_user']=$myusername;
  
  header("location: welcome.php");
  }
  else 
  {
  $error="Your Login Name or Password is invalid";
  }
  }
  ?&gt;
  </code></pre>
  
  <p>Error it throws out at line 16 is </p>
  
  <pre><code>$active=$row['active'];
  </code></pre>