<?php
include("session.php");
if(empty($_POST['psw'])){
	echo '
<form name="formPsw" onsubmit="savePass();return false">
	Nuova password:<br /><input type="password" name="psw" maxlength="50" size="20" /><br />
    <button type="button" onClick="savePass()">Salva</button> <button type="button" onClick="del(\'changePsw\')">Chiudi</button>
</form>	
	';	
}else{
	include("db.php");
	include("../db.php");
	mysql_query("UPDATE users SET password = '".$_POST['psw']."' WHERE userid = ".$_SESSION['user']['id']);
}
?>
