title: session_regster after sanitizing input?
body: <pre><code>$username = $_POST['myusername'];
  $password = $_POST['mypassword'];    
  $username = mysql_real_escape_string(stripslashes($username));
  $password = mysql_real_escape_string(stripslashes($password));
  session_register("username");
  session_register("password");
  </code></pre>
  
  <p>I have these lines in my code it's not the full structure but it's the relevant part.  Session_register(); is deprecated and the right way to do it is like: <code>$_SESSION['username'] = 'username';</code></p>
  
  <p>But I'm still not sure if it's correct.  I'm sort of worried because I really need to sanitize the input. (I'm trying to use the $_SESSION['username'] = 'username'; and get out of deprecated functions)</p>
  
  <p>Thanks.</p>