<?php 
	session_start();
	
	$pass1 = $_POST['cp1'];
	$pass2 = $_POST['cp2'];
	
	$userlogin_cp = $_SESSION['userloginname'];
	$userid_cp = $_GET['upid'];
	
	//echo "{$pass1},{$pass2},{$userlogin_cp},{$userid_cp}";

	include "../../../Connections/connect_mysql.php";
	//mysql_query("set names utf8");

    //$sql_s = "SELECT * FROM user_tb where usercode='{$usercode}' ";
	//$result_s = mysql_query($sql_s) or die(mysql_error());
	//if (mysql_num_rows($result_s)==0){
	$sqlED = "UPDATE user_tb SET userpassword='{$pass1}', updateby='{$userlogin_cp}', updatetime=NOW() WHERE userid = {$userid_cp} ";
	$resultED = mysql_query($sqlED) or die(mysql_error());
	
		if($resultED){
			echo "Y";
		}else{
			echo "N";
		}
		
	//}else{
		//echo "N";	
	//}
	
	mysql_close($c);

 ?>
