Les paso el codigo:
Código PHP:
Ver original
<?php include("function.php"); include("getdata.php"); include("connect.php"); //incluimos el connect.php que contiene los datos de la conexión a la db y la sesión $usuario = $_SESSION['usuario']; if($save) { query("update prueba set firstname='$firstname',lastname='$lastname' where usuario='$usuario'"); }; //todo comprobado, ahora solo falta mostrar los datos echo 'Bienvenid@ <b>'.$query['usuario'].'</b><br>'; } ?>
Y el html con el form:
Código PHP:
Ver original
<form name="form1" method="post" action="modificarperfil.php"> <table width="573" border="0"> <tr> <td>Nombre(s):</td> <td><input type="text" name="firstname" id="firstname" value=" <?php echo $query[firstname]; ?> " /></td> </tr> <tr> <td>Apellido:</td> <td><input type="text" name="lastname" id="lastname" value=" <?php echo $query[lastname];?> " /></td> </tr> </table> <div id="container_submit"> <input name="save" type="hidden" id="save" value="ok"> <input type=image height=23 alt=save width=87 src="images/save.jpg" border=0 name=Save> </div> </form> </div>
Cual puede ser la solucion a mi problema?
Gracias de antemano