Re: Paso de variables entre paginas en la URL

From: Date: Fri, 04 Jul 2003 16:32:19 +0000
Subject: Re: Paso de variables entre paginas en la URL
Groups: php.general.es 
Request: Send a blank email to general-es+get-38156@lists.php.net to get a copy of this message
_______________________ Bruno A Mejia C Gerencia de Redes Locales Tel: (574) 5108896 Ext 8595 Dir: Cra 52 # 50-20 Direccion General - Piso 15 www.bancolombia.com This email is confidential and may contain proprietary or privileged information. It is intended for use by the named recipient(s) only. If you have received it in error, please notify the sender immediately by reply email. Please do not copy or disclose its contents to any person or body. Immediately delete it from your computer systems. ----- Remitido por Bruno Alberto Mejia Cifuentes/TECNO/BANCOLOMBIA con fecha 04/07/2003 11:32 a.m. ----- Bruno Alberto Mejia Cifuentes 04/07/2003 07:07 a.m. Para: lista@phpes.com cc: Asunto: Re: [PHP-ES] Paso de variables entre paginas en la URL Buenos Dias Compañeros, Ayer coloque este caso: Buenos Dias compañeros, Tengo una pagina que saca valores de una tabla oracle. Una de las columnas de la tabla la debo pasar a otra pagina para hacer otra consulta basado en este valor (es decir, una consulta tipica maestro detalle). En la pagina inicial tengo lo siguiente: /* print "<TD align =\"left\"><a href=\"prueba_dist_node_sate.php?_id=$_id\">$_label</a></TD>"; */ /* print "<TD align =\"left\"><a href=\"prueba_dist_node_sate.php?_id=400\">$_label</a></TD>"; */ Comentarie las lineas solo para efectos de pruebas. La seguna linea pasa un valor fijo, 400, la primera pasa una valiable _id Al momento de dar click en el link y abrir la segunda pagina me sale el siguiente error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server at localhost Port 80 El error sale aun pasando el valor fijo 400. Por lo anterior no he logrado saber en donde esta el problema...Si en la pagina receptora de la variable o estoy pasando mal la variable _id Que se ha hecho? Ensaye las lineas que varios de ustedes me enviaron y efectivamente, al momento de parase en el link, se ve que esta cogiendo el valor de la variable que pretendo pasar como parametro a la otra pagina, pero el error sigue. Mirando el archivo c:\apache\logserror.log las dos ultimas entradas que se corresponden (segun la hora) a la ultima ejecucion de las dos paginas es: [Fri Jul 04 06:53:04 2003] [error] [client 10.10.215.25] Premature end of script headers: /apache/php/php.exe [Fri Jul 04 06:53:04 2003] [error] [client 10.10.215.25] PHP: Error parsing ./browscap/browscap.ini on line 8206 Ahora bien, miro las dos paginas pero no veo nada extraño en ellos, incluso, la ejecucion de las dos paginas de forma independiente si funciona, los anexo para que por favor me colaboren: Pagina http://10.10.215.25/sd/prueba_dist_state.php: <html> <head> <meta http-equiv="Content-Language" content="es-co"> <title>LISTA DE DISTRIBUCIONES</title> <base target="_self"> </head> <body bgcolor="#ffd8b0"> <p align="center"><b>LISTA DE DISTRIBUCIONES</b></p> <?php /* Variable global para enlazar dos paginas*/ /*global $id_dist; Id de la distribucion */ print "<HTML><PRE>\n"; $connection = ocilogon("mdstatus", "mdstatus", "TIV1.ORGBC.COM"); $stmt = OCIParse($connection, "select * from dist_state where SOURCE_APPLICATION = 'Software Distribution'"); $oerr = OCIError(); if ($oerr) { echo "Error ".$oerr["message"]; exit; } else { echo "Query chequeado con exito"; } OCIExecute($stmt); /* Se pinta la matriz */ print "<TABLE BORDER=\"1\">"; print "<TR>"; print "<TH>Software</TH>"; print "<TH>Comienza</TH>"; print "<TH>Finaliza</TH>"; print "<TH>Expira</TH>"; print "<TH>Total Destinos</TH>"; print "<TH>Completados</TH>"; print "<TH>Exitosos</TH>"; print "<TH>Fallados</TH>"; print "<TH>Cancelados</TH>"; print "<TH>En Espera</TH>"; print "<TH>Pausados</TH>"; print "<TH>Inalcanzables</TH>"; print "<TH>Interrumpidas</TH>"; print "<TH></TH>"; print "</TR>"; do { /* -------------------- */ /* Datos para la matriz */ /* -------------------- */ $_id = OCIResult($stmt, "ID"); $_label = OCIResult($stmt, "LABEL"); $_start = OCIResult($stmt, "START_TIME"); $_finish = OCIResult($stmt, "FINISH_TIME"); $_expire = OCIResult($stmt, "EXPIRE_TIME"); $_tarcount= OCIResult($stmt, "TARGET_COUNT"); $_complet = OCIResult($stmt, "COMPLETED_COUNT"); $_waiting = OCIResult($stmt, "WAITING_COUNT"); $_paused = OCIResult($stmt, "PAUSED_COUNT"); $_unavail = OCIResult($stmt, "UNAVAILABLE_COUNT"); $_interrup= OCIResult($stmt, "INTERRUPTED_COUNT"); $_success=OCIResult($stmt, "SUCCESSFUL_COUNT"); $_failed=OCIResult($stmt, "FAILED_COUNT"); $_canceled=OCIResult($stmt, "CANCELED_COUNT"); /* <td><a href="file:///C|/apache/htdocs/SD/opciones.htm" name="Name">Prueba de Enlace</a></td>*/ /*print "<TD><a href=\"file:///C|/apache/htdocs/SD/opciones.htm\" name=\"Name\">$_label</a></TD>"; */ /*print "<TD><a href=\"opciones.htm?id_dist=$_id\">$_label</a></TD>";*/ print "<TR>"; /* print "<TD align =\"left\"><a href=\"prueba_dist_node_sate.php?_id=$_id\">$_label</a></TD>"; */ /*print "<TD align =\"left\"><a href=\"prueba_dist_node_sate.php\">$_label</a></TD>"; */ print "<TD align =\"left\"><a href=\"prueba_dist_node_sate.php?id=".$_id."\">$_label</a></TD>"; /* ESTA LINEA LA MODIFIQUE SEGUN ME RECOMENDARON EN LA LISTA, ACA SE LLAMA A LA OTRA PAGINA */ print "<TD>$_start</TD>"; print "<TD>$_finish</TD>"; print "<TD>$_expire</TD>"; print "<TD>$_tarcount</TD>"; print "<TD>$_complet</TD>"; print "<TD>$_success</TD>"; print "<TD>$_failed</TD>"; print "<TD>$_canceled</TD>"; print "<TD>$_waiting</TD>"; print "<TD>$_paused</TD>"; print "<TD>$_unavail</TD>"; print "<TD>$_interrup</TD>"; } while (OCIFetch($stmt) ); OCIFreeStatement($stmt); OCILogoff($connection); ?> </body> </html> pagina http://10.10.215.25/sd/prueba_dist_node_state.php: <html> <head> <meta http-equiv="Content-Language" content="es-co"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>DETALLE DE LA DISTRIBUCION</title> <base target="_self"> </head> <body bgcolor="#3399FF"> <p align="center"><b>DETALLE DE LA DISTRIBUCION</b></p><br> <?php global $_id; echo "id de la distribucion ".$_dist; echo "Variable \$id: $_id <br>\n"; $connection = ocilogon("mdstatus", "mdstatus", "TIV1.ORGBC.COM"); $stmt = OCIParse($connection, "select * from dist_node_state where distribution_ID= '2065206669.639'"); OCIExecute($stmt); /* Se pinta la matriz */ print "<TABLE BORDER=\"1\">"; print "<TR>"; print "<TH>Destino</TH>"; /* NODE_NAME*/ print "<TH>Estado</TH>"; /* CURRENT_STATE */ print "<TH>Error</TH>"; /* ERROR_MSG */ print "<TH></TH>"; print "</TR>"; print "antes del do-while"; do { /* -------------------- */ /* Datos para la matriz */ /* -------------------- */ $_endpoint= OCIResult($stmt, "NODE_NAME"); $_estado = OCIResult($stmt, "CURRENT_STATE"); $_error = OCIResult($stmt, "ERROR_MSG"); switch ($_estado) { case 0: $_strestado = "ESPERANDO"; break; case 1: $_strestado = "PAUSADO";; break; case 2: $_strestado = "NO DISPONIBLE";; break; case 3: $_strestado = "RECIVIENDO";; break; case 4: $_strestado = "INTERRUMPIDO";; break; case 5: $_strestado = "ENVIANDO";; break; case 6: $_strestado = "EXITOSO";; break; case 7: $_strestado = "FALLIDO";; break; case 8: $_strestado = "CANCELADO";; break; case 9: $_strestado = "RECHAZADO";; break; case 10: $_strestado = "EXPIRADO";; break; case 11: $_strestado = "ALMACENADO";; break; } /* end switch */ print "<TR>"; print "<TD>$_endpoint</a></TD>"; print "<TD>$_strestado</TD>"; print "<TD>$_error</TD>"; } while (OCIFetch($stmt) ); OCIFreeStatement($stmt); OCILogoff($connection); ?> </body> </html> _______________________ Bruno A Mejia C Gerencia de Redes Locales Tel: (574) 5108896 Ext 8595 Dir: Cra 52 # 50-20 Direccion General - Piso 15 www.bancolombia.com This email is confidential and may contain proprietary or privileged information. It is intended for use by the named recipient(s) only. If you have received it in error, please notify the sender immediately by reply email. Please do not copy or disclose its contents to any person or body. Immediately delete it from your computer systems.

« previous php.general.es (#38156) next »