Hola, quiero que los usuarios puedan editar su perfil, los tengo ordenados en la tabla:
users
-id
-nick
-pass
-avatar
-mensaje
-email
Y tengo este codigo pero no se como hacerle para que puedan editar su perfil:
editarper.php
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Estacion Rap</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="ie.css" />
<script type="text/javascript">var clear="images/clear.gif";</script>
<script type="text/javascript" src="unitpngfix.js"></script>
<![endif]-->
<style type="text/css">
<!--
.Estilo1 {font-size: 24px}
.Estilo2 {
font-size: 18px;
font-weight: bold;
}
.Estilo3 {
font-size: 12px;
color: #000000;
}
.Estilo4 {font-size: 12px}
.Estilo5 {color: #000000}
-->
</style>
</head>
<body>
<?php
$conexion = mysql_connect("host", "user", "pass");
mysql_select_db("b15_5229524_estacion", $conexion);
$queEmp = "SELECT * FROM users ORDER BY id DESC";
$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
if ($totEmp> 0) {
while ($rowEmp = mysql_fetch_assoc($resEmp)) {
}
}
?>
<!-- BEGIN wrapper -->
<div id="wrapper">
<!-- BEGIN header -->
<?
include('arriba.php'); ?>
<!-- END header -->
<!-- BEGIN body -->
<div id="body">
<!-- BEGIN content -->
<div id="content">
<!-- begin post -->
<div class="post first Estilo1">
<div align="center" class="Estilo2">
<p>Editar tu perfil</p>
<form id="form1" name="form1" method="post" action="">
<label><span class="Estilo3">Password</span>
<input type="text" name="textfield" id="textfield" />
</label>
<p>
<label><span class="Estilo3">Repite Password</span>
<input type="text" name="textfield2" id="textfield2" />
</label>
</p>
<p>
<label>
<input type="submit" name="button" id="button" value="Cambiar password" />
</label>
</p>
<p>
<label><span class="Estilo3">Avatar</span>
<input type="text" name="textfield3" id="textfield3" />
</label>
</p>
<p>
<label>
<input type="submit" name="button2" id="button2" value="Cambiar avatar" />
</label>
</p>
<p class="Estilo4"><span class="Estilo5">Mensaje personal</span>
<label>
<input type="text" name="textfield4" id="textfield4" />
</label>
</p>
<p class="Estilo4">
<label>
<input type="submit" name="button3" id="button3" value="Cambiar mensaje personal" />
</label>
</p>
</form>
<p> </p>
</div>
</div>
<!-- end post -->
<!-- begin post --><!-- end post -->
<!-- begin post -->
<!-- end post -->
</div>
<!-- END content -->
<!-- BEGIN sidebar -->
<?
include('menu.php'); ?>
<!-- END sidebar -->
<div class="break"></div>
</div>
<!-- END body -->
<!-- BEGIN footer -->
<?
include('abajo.php'); ?>
<!-- END footer -->
</div>
<!-- END -->
</body>
</html>
He leido que es con Update, pero no se como hacerlo