![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
05/05/2003, 14:37
|
![Avatar de Chuty](http://static.forosdelweb.com/customavatars/avatar25958_1.gif) | | | Fecha de Ingreso: noviembre-2002 Ubicación: el bar de la esquina
Mensajes: 609
Antigüedad: 22 años, 3 meses Puntos: 2 | |
tengo un formulario en el cual estoy cargando una tabla de un base de datos, el mismo puede modificar insertar y suprimir, datos de la tabla pero no se como tengo que pasar las variables a las distintas paginas de Modificar y suprimir, sin utilizar metodo GET Desde ya muchas gracias y saludos a todos
Bueno yo realize esta pregunta en PHP
PHP:--------------------------------------------------------------------------------
<?php
session_start();
?>
<html>
<head><title>Menú de Reportes</title></head>
<basefont size="2" face="arial" >
<div align="center"><center>
<table >
<tr >
<td ><div align="center">
<p align="center"><b><>ABM - Administración de Tablas</font></b></div>
</td>
</tr><tr><td ><div >
<table >
<tr>
<td ><b>
<?
$conex = odbc_connect("MISERVER", "sa", "sa");
if($conex ) {
$Query = "select cod , des from mibase.onl_$nom_tabla";
$resultado = odbc_do($conex, $Query);
if( $resultado > 0 ) {
echo '<select name="campo_tbl" size="9" font face="Microsoft Sans Serif" size=1>' ;
while ( odbc_fetch_row($resultado) ) {
echo "<option>";
$cod= odbc_result($resultado,1);
$des= odbc_result($resultado,2);
echo "<font face='Microsoft Sans Serif' size=1>$cod - $des</font>";
}
echo "</select>";
}
odbc_free_result($resultado);
odbc_close($conex);
}
?>
</font></b></font></td>
<td height="32" width="1"></td>
<td width="126" height="32">
<center><font face="Microsoft Sans Serif" size=1><input type="button" value=" Insertar " onclick='location.href="SgfAdmTbl_Ins.php"'></font></center>
<p><center><font face="Microsoft Sans Serif" size=1><input type="button" value="Modificar" onclick='location.href="SgfAdmTbl_Mod.php"'></font></center></p>
<p><center><font face="Microsoft Sans Serif" size=1><input type="button" value=" Suprimir " onclick='location.href="SgfAdmTbl_Sup.php"'></font></center></p>
<p><center><font face="Microsoft Sans Serif" size=1><input type="button" value="Cancelar" onclick='location.href="SgfAdmTbl_Index.php"'>
</font>
</center><center></center></p></td></tr>
</table><center></div></center></table></table>
</body>
</hrml>
y me han respondido lo siguiente Pues no tiene nada que ver con PHP, seria con javascript. Tendrias un formulario normal con el action vacio y el method a POST. Y en los botones en lugar de modificar el location.href deberias modificar el action del form y hacer el submit del form.
Para mas detalles, foro Javascript.
Saludos.
PD: Aunque la solucion es basicamente traducir lo que te he puesto a javascript.
ahora como se hace esto...
bueno desde ya muchas gracias y saludos a todos |