title: HTML PHP MYSQL Change Password
body: <p>Hi i have this <a href="http://kramansronet.comze.com/" rel="nofollow">http://kramansronet.comze.com/</a></p>
  
  <p>registering and everything works</p>
  
  <p>when your in the member section of the page how can i add an Change password field?</p>
  
  <p>here is my page for the member login</p>
  
  <pre><code>  &lt;?php include "base.php"; ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;  
  &lt;head&gt;  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;  
  &lt;title&gt;User Management System (Tom Cameron for NetTuts)&lt;/title&gt;
  &lt;link rel="stylesheet" href="style.css" type="text/css" /&gt;
  &lt;/head&gt;  
  &lt;body&gt;  
  &lt;div id="main"&gt;
  &lt;?php
  if(!empty($_SESSION['LoggedIn']) &amp;&amp; !empty($_SESSION['Username']))
  {
       ?&gt;
  
      &lt;h1&gt;Member Area&lt;/h1&gt;
       &lt;p&gt;Thanks for logging in! Your username is &lt;b&gt;&lt;?=$_SESSION['Username']?&gt;&lt;/b&gt; and your email address is &lt;b&gt;&lt;?=$_SESSION['EmailAddress']?&gt;&lt;/b&gt;.&lt;/p&gt;&lt;br&gt;
  
       &lt;h3&gt;Account Tools:&lt;/h3&gt;
       Username: &lt;?=$_SESSION['Username']?&gt;&lt;br&gt;
       Password: &lt;?=$_SESSION['password']?&gt;&lt;br&gt;
       Email: &lt;?=$_SESSION['EmailAddress']?&gt;&lt;br&gt;
       Account Type: &lt;?=$_SESSION['accounttype']?&gt;&lt;br&gt;
  
  
      &lt;ul&gt;
  
          &lt;li&gt;&lt;a href="logout.php"&gt;Logout.&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  
      &lt;?php
  }
  elseif(!empty($_POST['username']) &amp;&amp; !empty($_POST['password']))
  {
       $username = mysql_real_escape_string($_POST['username']);
      $password = md5(mysql_real_escape_string($_POST['password']));
  
       $checklogin = mysql_query("SELECT * FROM users WHERE Username = '".$username."' AND Password = '".$password."'");
  
      if(mysql_num_rows($checklogin) == 1)
      {
           $row = mysql_fetch_array($checklogin);
          $email = $row['EmailAddress'];
          $accounttype = $row['accounttype'];
  
          $_SESSION['Username'] = $username;
          $_SESSION['EmailAddress'] = $email;
          $_SESSION['accounttype'] = $accounttype;
          $_SESSION['LoggedIn'] = 1;
  
           echo "&lt;h1&gt;Success&lt;/h1&gt;";
          echo "&lt;p&gt;Please Refresh your browser to go to memeber page.&lt;/p&gt;";
          echo "&lt;meta http-equiv='refresh' content='=2;index.php' /&gt;";
      }
      else
      {
           echo "&lt;h1&gt;Error&lt;/h1&gt;";
          echo "&lt;p&gt;Sorry, your account could not be found. Please &lt;a href=\"index.php\"&gt;click here to try again&lt;/a&gt;.&lt;/p&gt;";
      }
  }
  else
  {
      ?&gt;
  
     &lt;h1&gt;Member Login&lt;/h1&gt;
  
     &lt;p&gt;Thanks for visiting! Please either login below, or &lt;a href="register.php"&gt;click here to register&lt;/a&gt;.&lt;/p&gt;
  
      &lt;form method="post" action="index.php" name="loginform" id="loginform"&gt;
      &lt;fieldset&gt;
          &lt;label for="username"&gt;Username:&lt;/label&gt;&lt;input type="text" name="username" id="username" /&gt;&lt;br /&gt;
          &lt;label for="password"&gt;Password:&lt;/label&gt;&lt;input type="password" name="password" id="password" /&gt;&lt;br /&gt;
          &lt;input type="submit" name="login" id="login" value="Login" /&gt;
      &lt;/fieldset&gt;
      &lt;/form&gt;
  
     &lt;?php
  }
  ?&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>