Tema: correlativo
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/09/2003, 17:06
ReyMirko
 
Fecha de Ingreso: septiembre-2003
Mensajes: 7
Antigüedad: 20 años, 7 meses
Puntos: 0
correlativo

Hola, necesito ayuda urgente, como puedo hacer para que a medida que se pide un formulario nuevo aparezca el n° correlativo correspondiente...

Form:
<html>
<head>
<H3>Solicitud Mantención Preventiva</H3>
<style>
<!--
BODY{
CURSOR: url(onfire.ani);

}

-->
</style>
</head>
<body background="metal040.gif">
<script language="JavaScript">
var mensaje="Consultas y criticas a:\[email protected]";

function Toussaint(A)
{
if (document.all)
{
if (event.button == 2)
{
alert(mensaje);
return false;
}
}

if (document.layers)
document.captureEvents(Event.MOUSEDOWN);

}

document.onmousedown=Toussaint;
</script>
<FORM METHOD="POST" ACTION="Insertar.php">
<?
mysql_connect("localhost","Operador","datafull");
$sSQL="Select N_OTME From db_solicitudes";
mysql_select_db("MantEdif");
$result=mysql_query($sSQL);
?>
<table width="20%" border="2" cellspacing="1" cellpadding="1" align="left">
<tr>
<td><font size="2" face="Times">N° O.T.M.E.</font></td>
<td><input type=text value="<? echo $N_OTME ?> " name="Num_otme" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;" size="6" maxlength="7"></td>
</tr>
</table>
<table width="2%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table width="30%" border="2" cellspacing="1" cellpadding="1" align="center">
<tr>
<td><font size="2" face="Times">FECHA RECEPCION</font></td>
<td><input type="text" name="fecharecep" size="11" maxlength="10"></td>
</tr>
</table>
<br>
<DIV title="Datos Operarios"style="FONT-WEIGHT: bold; WIDTH: 16cm; COLOR: white; HEIGHT: 0.25cm; BACKGROUND-COLOR: steelblue"></DIV>
<br>
<table width="3%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<?
mysql_connect("localhost","Operador","datafull");
$sSQL="Select Solicitud From db_tiposolicitud";
mysql_select_db("Mantedif");
$result=mysql_query($sSQL);
?>
<table width="20%" border="2" cellspacing="1,5" cellpadding="1,5" align="left">
<tr>
<td><font size="2" face="Times">SOLICITUD</font></td>
<td><?
echo '<select name="Solicitud">';
while ($row=mysql_fetch_array($result))
{echo '<option>'.$row["Solicitud"];}
?>
</SELECT>
</tr>
</table>
<br>
<table width="3%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<br>
<table border="2" cellspacing="1" cellpadding="1" align="left">
<tr>
<td><font size="2" face="Times">DESCRIPCION</font></td>
<td><textarea cols="50" rows="3" name="descrip"></textarea></td>
</tr>
</table>
<table width="3%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<DIV title="Descripción Productos"style="FONT-WEIGHT: bold; WIDTH: 16cm; COLOR: white; HEIGHT: 0.25cm; BACKGROUND-COLOR: steelblue"></DIV>
<br>
<table width="10%" border="2" cellspacing="1,5" cellpadding="1,5" align="left">
<tr>
<td><font size="2" face="Times">SOLICITANTE</font></td>
<td><input type="text" name="solicitante" size="20" maxlength="20"></td>
</tr>
</table>
<table width="10%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<?
mysql_connect("localhost","Operador","datafull");
$sSQL="Select responsable From db_responsable";
mysql_select_db("MantEdif");
$result=mysql_query($sSQL);
?>
<table width="10%" border="2" cellspacing="1,5" cellpadding="1,5" align="left">
<tr>
<td><font size="2" face="Times">RESPONSABLE</font></td>
<td><?
echo '<select name="responsable">';
while ($row=mysql_fetch_array($result))
{echo '<option>'.$row["responsable"];}
?>
</SELECT>
</tr>
</table>
<br>
<br>
<DIV title="Repeticiones"style="FONT-WEIGHT: bold; WIDTH: 16cm; COLOR: white; HEIGHT: 0.25cm; BACKGROUND-COLOR: steelblue"></DIV>
<br>
<table width="7%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<?
mysql_connect("localhost","Operador","datafull");
$sSQL="Select sector From db_sector";
mysql_select_db("MantEdif");
$result=mysql_query($sSQL);
?>
<table width="20%" border="2" cellspacing="1" cellpadding="1" align="left">
<tr>
<td><font size="2" face="Times">SECTOR</font></td>
<td><?
echo '<select name="sector">';
while ($row=mysql_fetch_array($result))
{echo '<option>'.$row["sector"];}
?>
</SELECT>
</tr>
</table>
<table width="5%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<?
mysql_connect("localhost","Operador","datafull");
$sSQL="Select ccosto From db_solicitud";
mysql_select_db("MantEdif");
$result=mysql_query($sSQL);
?>
<table width="20%" border="2" cellspacing="1" cellpadding="1" align="center">
<tr>
<td><font size="2" face="Times">C. COSTO</font></td>
<td><?
echo '<select name="ccosto">';
while ($row=mysql_fetch_array($result))
{echo '<option>'.$row[""];}
?>
</SELECT>
</tr>
</table>
<br>
<br>
<br>
<table width="25%" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td>&nbsp;</td>
</tr>
</table>
<table border="2" cellspacing="1" cellpadding="1" align="left">
<tr>
<td><input type="submit" value="Ingreso Datos";></td>
</tr>
</table>
</body>
</html>

Última edición por ReyMirko; 20/09/2003 a las 18:31