Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/09/2010, 08:12
eke_ps
 
Fecha de Ingreso: septiembre-2010
Mensajes: 101
Antigüedad: 13 años, 7 meses
Puntos: 0
Exclamación

lo que quiero que se modifique es esto


Código HTML:
<?php if(isset($_GET['m'])){
	   $modificar=mysql_fetch_array(mysql_query("SELECT id,pregunta  FROM tbl_encuestasp WHERE id=".$_GET['id']));
	   $modificaropciones=mysql_query("SELECT idpregunta,respuesta FROM tbl_encuestasr WHERE idpregunta=".$_GET['id']);
	   ?>



<form id="Modificar" name="form1"  method="POST" action="adminencuesta.php">
<table align="center" border="0">
  <tr>
    <td height="48"width="342">Modifica la pregunta:
    
      <input  name="pregunta" type="text" id="pregunta" value="<?php echo($modificar['pregunta']);?>"  size="40"  maxlength="51" align="left" />
      <br /></td>
  </tr>
  	
   <tr><td height="1" bgcolor="#000000"></td></tr>
  <tr>
    <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>
  </tr>
   <tr><td height="1" bgcolor="#000000"></td></tr>
  <tr>
    <td height="43">modifica la opcion 4:
       <?php  /*if($data=mysql_fetch_assoc($modificarocpiones)){
		$opcion4=$data['respuesta'];
	   }else{
			$o="";   
	   }*/?>
       <?php $data=mysql_fetch_assoc($modificaropciones);?>
      <input type="text" id="opcion4" name="opcion4" value="<?php echo($data['respuesta']);?>" size="30" maxlength="28"/></td>
      
  </tr>
</table>
<input name="modificar" type="submit" id="modificar"value="modificar" onClick="MM_validateForm('pregunta','','R','opcion1','','R','opcion2','','R');return document.MM_returnValue"   />
</form> 


lo que no me funca es que arriba de todo yo hago esto


if(isset($_POST['modificar'])){
mysql_query("UPDATE tbl_encuestasp SET pregunta='".$_POST['pregunta'] ."' WHERE id=".$_POST['id']);

}



if(isset($_POST['Modificaropciones'])){
mysql_query("UPDATE tbl_encuestasr SET respuesta='".$_POST['respuesta']."' WHERE idpregunta=".$_POST['id']);

}




QUE ALGUIEN ME AYUDE PORFAVOR

[IMG]C:\Documents and Settings\eguzman\Mis documentos\Downloads[/IMG]

eso es

si necesitan todo el codigo diganme

Última edición por GatorV; 09/09/2010 a las 08:36