<?php
header("content-type:text/html;charset=utf-8");
session_start();
error_reporting(0);
if(!isset($_SESSION['admin_name'])){
   exit; 
}
require "../sql.php";
$username=$_POST['old_username'];
$pass_sql="select * from admin where admin='{$username}'";
$pass_row=mysql_fetch_assoc(mysql_query($pass_sql));
echo $pass_row['password'];

?>