Hola a todos...
Les comento, tengo unas paginas php, donde hago una consulta alli tengo un boton para volver a utilizar la consulta como hago, es a traves de un formulario..
Código php:
Ver originalinclude("session.php");
include ("conexion.php");
$conectar=conectarse();
switch ($boton)
{
case "Consulta Cedula":
{
//*******mostrar la consulta
echo"<center>";
echo"<center><img src='image002.gif' width='131' height='47' /></center>";
echo"<strong>MASA - Mecánicos Asociados S.A.</strong>";
echo"<br>";
echo"<strong>891102723-8</strong>";
echo"<br><br>";
echo "<table border = 2 align='center'>";
echo "<tr><td><strong><center>Cedula</center></strong></td><td><strong><center>Nombre</center></strong></td><td><strong><center>Cargo</center></strong></td><td><strong><center>Contrato</center></strong></td><td><strong><center>Email</center></strong></td><td><strong><center>Visible</center></strong></td>";
$sqlced="select * from contratos where cedula= '".$_POST['consulta']."'";
{
echo "<tr><td>"; echo $row2["cedula"];
echo "</td>";
echo "<td>"; echo $row2["nombre"];
echo "</td>";
echo "<td>"; echo $row2["cargo"];
echo "</td>";
echo "<td>"; echo $row2["contrato"];
echo "</td>";
echo "<td>"; echo $row2["email"];
echo "</td>";
echo "<td>"; echo $row2["visible"];
echo "</td></tr>";
}
echo "</table>";
echo"<center><form name='form1' method='post' action='guardar.php'>";
echo"<input type='submit' name='Submit' value='<< Volver'>";
echo"</form>";
echo"</center>";
break;
}
?>
y en el action del formulario del boton Volver quiero ir a la pantalla de la consulta que esta dentro la pagina guardar.php
Código php:
Ver originalcase "Consultar":
{
echo"<center>";
echo"<center><img src='image002.gif' width='131' height='47' /></center>";
echo"<strong>MASA - Mecánicos Asociados S.A.</strong>";
echo"<br>";
echo"<strong>891102723-8</strong>";
echo"<br><br>";
//********formulario de la consulta
echo"<form name='form1' method='post' action='consultaradm.php'>";
//echo"Consulta";
echo"<table width='689' border='0'>";
echo"<tr>";
echo"<table width='200' border='1' align='center'>";
echo"<tr>";
echo"<td><div align='center'>";
echo"<input type='submit' name='boton' value='Consulta Cedula'/>";
echo"</div></td>";
echo"<td><div align='center'>";
echo"<input type='submit' name='boton' value='Consulta Nombre'/>";
echo"</div></td>";
echo"</tr>";
echo"<tr>";
echo"<td><div align='center'>";
echo"<input type='submit' name='boton' value='Consulta Contrato'/>";
echo"</div></td>";
echo"<td><div align='center'>";
echo"<input type='submit' name='boton' value='Consulta E-Mail'/>";
echo"</div></td>";
echo"</tr>";
echo"</table>";
echo"</tr>";
echo"</table>";
echo"<input type='text' name='consulta' maxlength='30' size='50' onFocus=this.style.background='#ccffff' onBlur=this.style.background='#ffffff'/>";
echo"</form></center>";
//echo"<input type='submit' name='consultar' value='Consultar'/>";
echo"<center><form name='form2' method='post' action='contratos.php'>";
echo"<br>";
echo"<input type='submit' name='Submit' value='<< Volver'>";
echo"</form></center>";
}
Quiero que me muestre de nuevo el formulario que tengo en este case "Consultar"