Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/04/2005, 13:27
martinchevez
 
Fecha de Ingreso: julio-2003
Ubicación: Lima Peru
Mensajes: 6
Antigüedad: 20 años, 9 meses
Puntos: 0
Isaac gracias por tu respuesta, pero aun estoy un poco confundido te explico como lo estoy haciendo:

este es la pagina donde creo mi formulario como veras llama una pagina php llamada consulta.php en esta hago la conexion a la db y el select probe y si funciona encuentra el registro que busco, mi problema es como mostar los datos del registro encontrado en consulta.php en el formulario de esta pagina:

<head>
<title>INGRESO DE DATOS SOAT</title>
</head>

<body>
<table width="744" border="0">
<tr>
<td width="738">&nbsp;</td>
</tr>
</table>
<table width="741" height="119" border="0">
<tr>
<td height="115"><form name="form1" id="form1" method="post" action="conplaca.php">
<table width="440" border="0">
<tr>
<td width="64">PLACA</td>
<td width="112"><input name="placa" type="text" id="placa" size="7" /></td>
<td width="250"><input type="submit" name="Submit" value="consulta" /></td>
</tr>
<tr>
<td>Cliente</td>
<td><input name="codclie" type="text" id="codclie" /></td>
<td>&nbsp;</td>
</tr>
</table>
</form></td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>

*********************************
*archivo consulta.php
*********************************
<?
include("functions.inc");
$isdb_system = 'masa';
$isdb_database = 'datos';
$isdb_conntype = '0';
$isdb_user = 'user';
$xpass = 'user';
$dsn = "DRIVER=iSeries Access ODBC Driver;SYSTEM=$isdb_system;DBQ=$isdb_database;UID= $isdb_user;Password=$xpass";
if (!$isPase) {
$db = odbc_pconnect($dsn, $_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]);
} else {
$db = odbc_connect($isdb_system, "", "");
}
if ($db == 0) {
echo "<td><h1>Error connecting to system</h1>";
echo "<p>An error occurred connecting to system " . $isdb_system . ", schema " . $isdb_database;
echo "<p>The error was: " . odbc_errormsg();
echo "<p><form method=\"POST\" action=\"index.php\"><input type=\"submit\" name=\"action\" value=\"Retry\">";
exit;
}
$query = "select NPLCVH,CDCLNT,NMTRVH,CDMDLO,CMRCAS,NANVHC,CDCLRV FROM SRMPLL WHERE NPLCVH = '$PLACA'";
$cur = odbc_exec($db,$query);
checksql($cur);
?>