aqui esta todo lo que tengo hecho...
Código PHP:
<?php
include ("Conexion.php");
session_start();{
$ide=$_SESSION['login'];
$consulta = "select * from usuario where id = '$ide' ";
$sentencia = mysql_query($consulta,$con);
while ($rs=mysql_fetch_array($sentencia)){
$rut = $rs["rut"];
$nombre= $rs["usunom"];
$cargo=$rs["cargo"];
$direccion=$rs["usudir"];
$fono = $rs["usufon"];
$mail= $rs["usumail"];
if(isset($_POST["btnedpwd"])){
$xpwd=$_SESSION['cont'];
$txtcontrao=$_POST['txtcontrao'];
$txtcontra1=$_POST['txtcontra1'];
if ($txtcontrao==$xpwd){
$sql="UPDATE usuario SET contra = '$txtcontra1' WHERE id='$ide'";
$sentex=mysql_query($sql,$con);
}
else{
echo ("Cambio de Contraseña Fallido, Vuelva a Intentar");
}}}}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body bgcolor="#FF6600">
<div align="center">
<table width="322" height="213" border="1">
<tr>
<td height="23" colspan="2"><div align="center">MIS DATOS </div></td>
</tr>
<tr>
<td height="23">ID</td>
<td height="23"><form id="form1" name="form1" method="post" action="">
<label for="textfield"></label>
<input name="ide" type="text" id="ident" value="<?php echo $ide; ?> " readonly="readonly" />
</form>
<tr>
<td height="23">RUT</td>
<td height="23"><label for="textfield2"></label>
<input name="rut" type="text" id="rut" value="<?php echo $rut;?>" readonly="readonly" />
</td>
</tr>
<tr>
<td height="23">NOMBRE</td>
<td height="23"><label for="textfield3"></label>
<input name="name" type="text" id="nombre" value= "<?php echo $nombre;?> "readonly="readonly" />
</td>
</tr>
<tr>
<td height="23">CARGO</td>
<td height="23"><label for="textfield4"></label>
<input name="cargo" type="text" id="cargo" value="<?php
echo $cargo;?>" readonly="readonly"/>
</td>
</tr>
<tr>
<td width="162" height="26">DIRECCION</td>
<td width="144"><label for="textfield5"></label>
<input name="direccion" type="text" id="vivir" value="<?php echo $direccion;?> " readonly="readonly" />
</td>
</tr>
<tr>
<td height="26">FONO</td>
<td><label for="textfield6"></label>
<input name="fono" type="text" id="number" value="<?php echo $fono;?>" readonly="readonly" />
</td>
</tr>
<tr>
<td height="26">E-MAIL</td>
<td><label for="textfield7"></label>
<input name="mail" type="text" id="correo" value="<?php
echo $mail;?>" readonly="readonly" />
</td>
</tr>
</table>
<p> </p>
</div>
<div align="center">
<table width="319" border="1">
<tr>
<td colspan="2"><div align="center">CAMBIO DE CLAVE</div></td>
</tr>
<tr>
<td width="159" height="26">CLAVE ANTERIOR</td>
<td width="144"><label for="txtcontrao"></label>
<input type="password" name="txtcontrao" id="txtcontrao"/>
</tr>
<tr>
<td height="26">NUEVA CLAVE</td>
<td><label for="txtcontra1"></label>
<input type="password" name="txtcontra1" id="txtcontra1" />
</td>
</tr>
</table>
</div>
<p align="center">
<input type="submit" name="btnedpwd" id="btnedpwd" value="Cambiar Contraseña" />
</p>
<p align="center"><A href="MenuUsuario.php"><i>VOLVER</i></A></p>
</form>
</body>
</html>