<?php session_start(); ?>
<?php  
include("config.php");

if(isset($_SESSION['nume'])) {
      	$userb = ''.$_SESSION['nume'].'';
 $getuser=mysql_query("SELECT * from utilizatori WHERE nume='$userb'");
  $getuser3=mysql_fetch_array($getuser);
if(strlen($getuser3[nume])>1)
  {
?>
<?php
   $data_nrv = date(" j-F-Y, g:i a ");   // Pt. stabilire nr. verificare
   $nr_v = md5($data_nrv);
   if(isset($_SESSION['nrv'])) { unset($_SESSION['nrv']); }
   $_SESSION['nrv'] = substr($nr_v, 3, 5);
   
	echo '<form action="changed.php" method="post">
                           Username : '. $_SESSION['nume']. ' <br />
		 <label for="pass">Curent Password:        </label><input type="text" name="pass" maxlength="18" id="pass" /><br /><br />
		 <label for="pass2">New Password: </label><input type="text" name="newpass" maxlength="18" id="newpass" /><br /><br />
         <label for="nrv">Code:           <font color="red" size="4">'. $_SESSION['nrv']. '</font></label><input type="text" name="nrv" size="5" maxlength="6" id="nrv" /><br /><br />
         <tr>
 <td colspan=\'2\'><hr size=\'1\'>
		 <input type="submit" name="subjoin" value="Change my password">
</form>';
?>
<?php
}}
?>