Ver Mensaje Individual
  #9 (permalink)  
Antiguo 01/03/2010, 14:27
jona99
 
Fecha de Ingreso: febrero-2010
Ubicación: Edo. Mexico
Mensajes: 7
Antigüedad: 14 años, 2 meses
Puntos: 0
Mensaje Respuesta: Id sobre un boton

Codigo con el que cacho las respuestas enviadas por el metodo post y
continuacion del cuestionario

Código HTML:
Respuesta1:<?php echo $_POST['hiddenField1']?><br> 
Respuesta2:<?php echo $_POST['hiddenField2']?><br>
Respuesta3:<?php echo $_POST['hiddenField3']?><br>
Respuesta4:<?php echo $_POST['hiddenField4']?><br>
Respuesta5:<?php echo $_POST['hiddenField5']?><br>

<style type="text/css">
.bot1{
	background-color:73BFE8;
}
.bot1:hover{ 
	background-color:#000000;
}
.bot1:active{ 
	background-color:#000000;
}
</style>

<div id="cuerpo1" style="height:auto;">
<div class="ventana" style="height:auto;">

<script type="text/javascript">
function establecevalor(variable_escondida, valor){
var variable=document.getElementById(variable_escondida);
variable.value=valor;
}
</script>

<form id="form1" name="form1" method="POST" action="SIM81000_01.php">
<br />

<table align="center"  width="90%" cellpadding="15" border="0">
  <tr>
  <td height="10px" align="left" valign="top" bgcolor="#73BFE8" color="">
    <div id="botonesventmje" align="center">
<?php 
$sql=mysql_query("SELECT * FROM PREGUNTAS WHERE Tipo_evaluacion=3 LIMIT 5,5");
while ($reg=mysql_fetch_array($sql)){
	echo '<div>';
	echo '<table width="80%" cellpadding="1" cellspacing="10" bgcolor="#FFFFFF" align="center"> ';				
	echo '<tr><td colspan="8" align="left">'.$reg ['pregunta'].'</td></tr>';  
	echo '<tr>';
	?>

	<?php 
	$g=5;
	$g++; ?>

	<td width="15%" align="center"><input type="button" value="<?php echo $reg['respuesta1']?>" onclick="establecevalor('hiddenField<?php echo $g ?>',1)"></td> 
	<td width="15%" align="center"><input type="button" value="<?php echo $reg['respuesta2']?>" onclick="establecevalor('hiddenField<?php echo $g ?>',2)"></td>
	<td width="15%" align="center"><input type="button" value="<?php echo $reg['respuesta3']?>" onclick="establecevalor('hiddenField<?php echo $g ?>',3)"></td> 
	<td width="15%" align="center"><input type="button" value="<?php echo $reg['respuesta4']?>" onclick="establecevalor('hiddenField<?php echo $g ?>',4)"></td>
	<input type="hidden" id="hiddenField1" name="hiddenField<?php echo $g ?>" value=""><br />

	<?php
	echo '</tr>';
	echo '</table>';
	echo '</div>';
	echo '<br />';
	} ?></div></td><tr/>
</table>
<br />
<td align="right"><input type="submit" value="CONFIRMAR" style="background-color:#00CC00"></td>
<td align="right"><input onClick="javascript:window.history.back();" type="button" name="Submit" value="Volver" /></td>
  </form>
      	</div>
      <div>