09/09/2010, 09:19
|
| | Fecha de Ingreso: septiembre-2010
Mensajes: 101
Antigüedad: 14 años, 5 meses Puntos: 0 | |
Respuesta: problemas con update se modifican todas las respuestas
mysql_query("UPDATE tbl_encuestasr SET respuesta='".$_POST['modopcion1'] ."' WHERE idpregunta=".$_POST['id'])or die(mysql_error());
se modifican todas si modifico la primera ahora
<td height="42">modifica la opcion 1:
<?php $data=mysql_fetch_assoc($modificaropciones);?>
<input name="modopcion1" type="text" id="opcion1" value="<?php echo($data['respuesta']);?>" size="30" maxlength="28" /></td>
</tr>
<tr><td height="1" bgcolor="#000000"></td></tr>
<tr>
<td height="42">modifica la opcion 2:
<?php $data=mysql_fetch_assoc($modificaropciones);?>
<input name="opcion2" type="text" id="opcion2" value="<?php echo($data['respuesta']);?>" size="30" maxlength="28"/></td>
</tr>
<tr><td height="1" bgcolor="#000000"></td></tr>
<tr>
<td height="49">modifica la opcion 3:
<?php $data=mysql_fetch_assoc($modificaropciones);?>
<input type="text" id="opcion3" name="opcion3"size="30" value="<?php echo($data['respuesta']);?>" maxlength="28"/></td> |