<?php
session_start();
require_once('../conexion.php');
require_once('../include/sesiones.php'); 
if($_POST['clave'] != $_POST['clave_conf']) 
{
  echo '<div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <strong>Las contraseñas!</strong> no son iguales.
    </div>';
}
else 
{
    $usu_id=$_SESSION['usu_id'];
    $usu_username=$_POST["usu_username"];
    $clave=$_POST["clave"];
    $sq1=mysqli_query($con,"UPDATE usuario SET usu_clave='$clave',usu_username='$usu_username' WHERE usu_id='$usu_id' ") or die(mysqli_error($con));
    if($sq1)
    {
        echo '<div class="alert alert-success alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <strong>Contraseña!</strong> Actualizada.
            </div>';
    }
    else 
    {
          echo '<div class="alert alert-danger alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <strong>Error al!</strong> Actualizar contraseña.
                </div>';
    }
}                                              
?>