![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)
Este es mi codigo: (visa1.php) en el cual al ejecutarse me abre una tabla de insercion de datos, los datos que se insertan me los muestra en una tabla, pero quiero que esos datos que inserte los muestre en un popup.
ME PODRIAN AYUDAR POR FAVOR....
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=1,width=600,height=300,left = 212,top = 234');");
}
</script>
<?php
echo "<html>";
echo "<title></title>";
echo "<head>";
echo'<div id="Layer1" style="position:absolute; width:893px; height:31px; z-index:21; background-image: url(barrasuperior.jpg); layer-background-image: url(barrasuperior.jpg); border: 1px none #000000; left: 43px; top: 16px;"></div>';
echo'<div id="Layer2" style="position:absolute; width:300px; height:28px; z-index:22; left: 363px; top: 67px;">';
echo' <div align="center"><strong><font color="#0000CC" size"18">C O N S T A N C I A S</font></strong></div>';
echo'</div>';
echo'<div id="Layer3" style="position:absolute; width:894px; height:31px; z-index:23; left: 50px; top: 852px; background-image: url(barrasuperior.jpg); layer-background-image: url(barrasuperior.jpg); border: 1px none #000000;"></div>';
echo'<div id=contenido style="position: absolute; left:32px; top: 119px; width:936px; height: 715px; z-index:20; background-image: url(cajavisa.jpg); layer-background-image: url(cajavisa.jpg); border: 1px none #000000;"; border:5px"> ';
echo' <p> </p>';
echo' <p align="center" class="Estilo2"> </p>';
echo'<p align="center" class="Estilo2"> </p>';
echo "</head>";
echo "<body>";
echo "<center>";
echo '<form name="form" action="visa1.php" method="post" >';
echo '<select name="select">';
echo ' <option>CONSTANCIAS</option>';
echo "<option>Visa</option>";
echo " <option>Escalafon</option>";
echo "</select>";
echo " <br><br><br>";
echo 'RFC:<input name="rfcc" type="text" size="13">';
echo "<br><br><br>";
echo ' <table width="555" border="1">';
echo " <tr>";
echo '<td><div align="center">unidad</div></td>';
echo '<td><div align="center">subunidad</div></td>';
echo '<td><div align="center">plaza</div></td>';
echo '<td><div align="center">categoria</div></td>';
echo '<td><div align="center">hrs</div></td>';
echo '<td><div align="center">percepciones</div></td>';
echo '<td><div align="center">07</div></td>';
echo '<td><div align="center">04</div></td>';
echo '<td><div align="center">A1</div></td>';
echo '<td><div align="center">ctro</div></td>';
echo "</tr>";
echo "<tr>";
echo '<td><div align="center">';
echo '<input name="unidad" type="text" size="2" maxlength="2">';
echo " </div></td>";
echo '<td><div align="center">';
echo '<input name="subunidad" type="text" size="2" maxlength="2">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="plaza" type="text" size="6" maxlength="6">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="categ" type="text" size="6" maxlength="6">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="hrs" type="text" size="2" maxlength="2">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="percepciones" type="text" size="10" maxlength="10">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="cerosiete" type="text" size="10" maxlength="10">';
echo "</div></td>";
echo '<td><div align="center">';
echo '<input name="cerocuatro" type="text" size="7" maxlength="7">';
echo " </div></td>";
echo '<td><div align="center">';
echo '<input name="auno" type="text" size="7" maxlength="7">';
echo "</div></td>";
echo '<td><input name="ctro" type="text" size="10" maxlength="15"></td>';
echo "</tr>";
echo "</table>";
echo "<br><br><br>";
echo '<input type="submit" name="Submit" value="Insertar">';
echo '</form>';
include("conexion.php");
$link=Conectarse();
$sql="select rfc from usuarios where rfc='$rfcc' ";
$query= mysql_query($sql,$link);
if ( mysql_num_rows($query) >0 )
{
mysql_query("insert into constanciass(rfccons,unidad,subunidad,plaza,categ, hrs,percepciones,cerosiete,cerocuatro,auno,ctro) values ('$rfcc','$unidad','$subunidad','$plaza','$categ', '$hrs','$percepciones',$cerosiete,$cerocuatro,$aun o,'$ctro')",$link);
}
$result=mysql_query("select * from constanciass where rfccons='$rfcc' ",$link);
echo '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1> ';
echo '<TR> <TD> <B>RFC</B></TD> <TD> <B>Unidad</B></TD> <TD> <B>Subunidad</B></TD> <TD> <B>Plaza</B></TD> <TD> <B>Categoria</B></TD> <TD> <B>Horas</B></TD> <TD> <B>Percepciones</B></TD> <TD> <B>0 7</B></TD> <TD> <B>0 4</B> </TD> <TD> <B>A 1</B></TD> <TD> <B>Centro de trabajo</B></TD> <TD> <B>Eliminar</B></TD> <TD> <B>Modificar</B></TD> </TR>';
//ESTA PARTE ES LA TABLA QUE QUIERO QUE ME APARESCA EN EL POPUP
while($row = mysql_fetch_array($result))
{
printf("<tr> <td> %s</td> <td> %s</td> <td> %s </td> <td> %s</td> <td> %s</td> <td> %s</td> <td> %s</td> <td> %s</td> <td> %s</td> <td> %s</td> <td> %s</td> <td><a href=\"borrar.php?id=%d\">Borrar</a></td> <td><a href=\"editar.php?id=%d\">Editar</a></td> </tr>", $row["rfccons"], $row["unidad"], $row["subunidad"], $row["plaza"], $row["categ"], $row["hrs"], $row["percepciones"], $row["cerosiete"], $row["cerocuatro"], $row["auno"], $row["ctro"], $row["id_cons"], $row["id_cons"]);
}
mysql_free_result($result);
mysql_close($link);
echo '</table>';
echo "</center>";
echo '</body>';
echo '</html>';
?>
<html>
<body>
<center><br><br><br>
<A HREF="javascript:popUp('')">Ver Lista de Claves</A>
</center>
</body>
</html>