Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/12/2008, 09:52
helacer
 
Fecha de Ingreso: mayo-2006
Ubicación: Bogotá
Mensajes: 2.061
Antigüedad: 18 años
Puntos: 50
Respuesta: Ayuda con update

segun veo tiene desordenado el codigo

Código PHP:
<br><br>
<form name="forma11" action="" method="get">
<table border="0" align="center">
<tr>
<td>Nombre:</td>
<td><input type="text" name="nombre" size="20" maxlength="256">
</td>
</tr>
<tr>
<td>tipo</td>
<td><input type="text" name="tipo" size="20" maxlength="256">
</td>
</tr> 
<tr><td colspan="2" align="center"><input type="submit" id="listo"value="listo" name="listo">
</td></tr>
</table>
</form>
<?
include("../conectar.php");
$link=Conectarse(); 

// validamos si ya se le dio enviar al formulario
if (isset($_REQUEST["listo"])){
$id=$_POST['id']; 
$nombre $_POST['nombre'];
$tipo $_POST['tipo']; 
mysql_query("Update coche Set nombre='$nombre', tipo='$tipo' where id='$id'");

?>