Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/12/2013, 19:04
Avatar de elmoikano
elmoikano
 
Fecha de Ingreso: enero-2013
Mensajes: 50
Antigüedad: 11 años, 4 meses
Puntos: 0
Pregunta imprimir informacion de una tabla en una encuesta

Hola, tengo un nuevo lío y es el siguiente:
Tengo una encuesta de satisfacción que ya esta lista y trabajando, es decir ya puede ingresar información correctamente, pero el problema es que antes de enviar la información de la encuesta quiero imprimir en ella información de otra tabla llamda cursos (los datos son fecha, instructor y folio)

La encuesta es esta:

Código HTML:
<script>
			function showUser(str)
			{
			if (str=="")
			  {
			  document.getElementById("txtHint").innerHTML="";
			  return;
			  } 
			if (window.XMLHttpRequest)
			  {// code for IE7+, Firefox, Chrome, Opera, Safari
			  xmlhttp=new XMLHttpRequest();
			  }
			else
			  {// code for IE6, IE5
			  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			  }
			xmlhttp.onreadystatechange=function()
			  {
			  if (xmlhttp.readyState==4 && xmlhttp.status==200)
			    {
			    document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
			    }
			  }
			xmlhttp.open("GET","getcurso.php?q="+str,true);
			xmlhttp.send();
			}
	</script>

<!--[if lt IE 10]>
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>

<body id="public">
<div id="container" class="ltr">

<h1 id="logo">
<a href="" title="">BiblioTK</a>
</h1>

<form id="form2" name="form2" class="wufoo topLabel page" enctype="multipart/form-data" method="post"
 action="encuestaIn.php">
  
<header id="header" class="info">
<h2>Encuesta de Satisfacción</h2>
<caption id="title5">
Información del curso</p>	
</caption>
<!--<td>Folio:<input type="text" onchange="showUser(this.value)" name= "folio" size="4" maxlength="11"></td>
<td><div id="txtHint"></div></td>-->

<div> </div>
</header>
<ul>
<li id="foli5" class="likert notranslate 
escala  
col5
hideNumbers 
 ">
<table cellspacing="0">
<caption id="title5">
Califica el curso considerando los siguientes aspectos (selecciona la opción que consideres adecuada):
<span id="req_5" class="req">*Campo obligatorio</span>
</caption>
<thead>
<tr>
<th>&nbsp;</th>
<td >Excelente</td>
<td >Bueno</td>
<td >Regular</td>
<td >Malo</td>
<td >Pésimo</td>
</tr>
</thead>
<tbody>
<tr class="statement5">
<th><label for="Field5">Profundidad del tema</label></th>
<td title="Excelente">
<input id="Field5_1" name="Field5" type="radio" tabindex="1" value="5" />
<label for="Field5_1">1</label>
</td>
<td title="Bueno">
<input id="Field5_2" name="Field5" type="radio" tabindex="2" value="4" />
<label for="Field5_2">2</label>
</td>
<td title="Regular">
<input id="Field5_3" name="Field5" type="radio" tabindex="3" value="3" />
<label for="Field5_3">3</label>
</td>
<td title="Malo">
<input id="Field5_4" name="Field5" type="radio" tabindex="4" value="2" />
<label for="Field5_4">4</label>
</td>
<td title="P&eacute;simo">
<input id="Field5_5" name="Field5" type="radio" tabindex="5" value="1" />
<label for="Field5_5">5</label>
</td>
</tr>
<tr class="alt statement6">
<th><label for="Field6">Orden en la presentación</label></th>
<td title="Excelente">
<input id="Field6_1" name="Field6" type="radio" tabindex="6" value="5" />
<label for="Field6_1">1</label>
</td>
<td title="Bueno">
<input id="Field6_2" name="Field6" type="radio" tabindex="7" value="4" />
<label for="Field6_2">2</label>
</td>
<td title="Regular">
<input id="Field6_3" name="Field6" type="radio" tabindex="8" value="3" />
<label for="Field6_3">3</label>
</td>
<td title="Malo">
<input id="Field6_4" name="Field6" type="radio" tabindex="9" value="2" />
<label for="Field6_4">4</label>
</td>
<td title="P&eacute;simo">
<input id="Field6_5" name="Field6" type="radio" tabindex="10" value="1" />
<label for="Field6_5">5</label>
</td>
</tr>
<tr class="statement7">
<th><label for="Field7">Claridad en la exposición</label></th>
<td title="Excelente">
<input id="Field7_1" name="Field7" type="radio" tabindex="11" value="5" />
<label for="Field7_1">1</label>
</td>
<td title="Bueno">
<input id="Field7_2" name="Field7" type="radio" tabindex="12" value="4" />
<label for="Field7_2">2</label>
</td>
<td title="Regular">
<input id="Field7_3" name="Field7" type="radio" tabindex="13" value="3" />
<label for="Field7_3">3</label>
</td>
<td title="Malo">
<input id="Field7_4" name="Field7" type="radio" tabindex="14" value="2" />
<label for="Field7_4">4</label>
</td>
<td title="P&eacute;simo">
<input id="Field7_5" name="Field7" type="radio" tabindex="15" value="1" />
<label for="Field7_5">5</label>
</td>
</tr>
<tr class="alt statement8">
<th><label for="Field8">Material didáctico utilizado</label></th>
<td title="Excelente">
<input id="Field8_1" name="Field8" type="radio" tabindex="16" value="5" />
<label for="Field8_1">1</label>
</td>
<td title="Bueno">
<input id="Field8_2" name="Field8" type="radio" tabindex="17" value="4" />
<label for="Field8_2">2</label>
</td>
<td title="Regular">
<input id="Field8_3" name="Field8" type="radio" tabindex="18" value="3" />
<label for="Field8_3">3</label>
</td>
<td title="Malo">
<input id="Field8_4" name="Field8" type="radio" tabindex="19" value="2" />
<label for="Field8_4">4</label>
</td>
<td title="P&eacute;simo">
<input id="Field8_5" name="Field8" type="radio" tabindex="20" value="1" />
<label for="Field8_5">5</label>
</td>
</tr>
</tbody>
</table>
</html> 
lo que quiero es que desde una tabla donde se encuentran todos los cursos al dar clic en el folio del curso me imprima los datos antes mecionados de folio, fecha, instructor etc., este es el script de los cursos:
Código PHP:
<!DOCTYPE html>
<
html>
    <
head>
        <
title>Reporte Cursos Registrados</title>
    </
head>
    <
body>
        Include 
"config.php"                
            
$query"SELECT folio as q,typ_curso,fecha,horario,duracion,solicitante,programa,materia,clave_mat,Instructor,
            nom_curso,tematica,rec_sol,rec_utili,asistentes,semestre,ty_usuario,encues,observa from reg_cursos Order by folio desc"
;
            
            
$result=mysql_query($query)
            OR DIE (
"Consulta fallida: ".mysql_error());
            
            echo 
"<TABLE BORDER = '3' id='export_excel'>";
            echo 
"<tr>";
            echo 
"<th>Folio</th>";
            echo 
"<th>typ_curso</th>";
            echo 
"<th>fecha</th>";
            echo 
"<th>horario</th>";
            echo 
"<th>duracion</th>";
            echo 
"<th>solicitante</th>";
            echo 
"<th>programa</th>";
            echo 
"<th>materia</th>";
            echo 
"<th>clave_mat</th>";
            echo 
"<th>nom_curso</th>";
            echo 
"</tr>";
            
            while (
$row mysql_fetch_array($result))
                {
                    echo 
"<tr>";
                    
printf("<td><a href=../encuestas/index.php target=I1 >&nbsp;%s</a></td>"$row["q"]);
                    echo
"<td>",$row['typ_curso'],"</td>
                    <td>"
,$row['fecha'],"</td>
                    <td>"
,$row['horario'],"</td>
                    <td>"
,$row['duracion'],"</td>
                    <td>"
,$row['solicitante'],"</td>
                    <td>"
,$row['programa'],"</td>
                    <td>"
,$row['materia'],"</td>
                    <td>"
,$row['clave_mat'],"</td>
                    <td>"
,$row['nom_curso'],"</td>            
                    echo "
</tr>";
                }
            echo "
</table>";
            
        if (!$result) {
        die("
No exitsten Datos" . mysql_error());
        }
        
        mysql_close($conexion)
        ?>
        
    </body>
</html> 
Entonces mi pregunta es como puedo hacer que al dar clic en el folio de la tabla me abra la encuesta con inofmración del curso en la encuesta? habia pensado que con la funcion showuser podria resolverlo pero ha sido en vano y mis conocimientos son limitados quizal alguna orientación que pudieran proporcionarme?

saludos cordiales. y de antemano agradezco su apoyo....
__________________
Bibliotecario pero morboso de las Tecnologías....