
18/12/2007, 12:25
|
| | Fecha de Ingreso: julio-2007
Mensajes: 114
Antigüedad: 17 años, 7 meses Puntos: 0 | |
Re: Guardar de diferentes bases de datos aqui les coloco el codigo q tengo Cita: <html>
<head>
</head>
<body>
<form action="gsegunda.php" method="POST">
<table>
<tbody >
<tr>
<td><img src="imagenes/logome.JPG" width="502" height="197"></td>
</tr>
</tbody>
</table>
<div align="center"><h1>Actualizacion Nomina</h1></div>
</html>
<?php
$ccedula=$_POST["ccedula"];
$link = mysql_connect("localhost", "root", "");
mysql_select_db("laborales", $link);
$result=mysql_query("SELECT dcargo,cdependencia,ddependencia,dnombre,ccedula,m neto,mletra,n_anos,n_meses,mtot_asigna FROM fijos WHERE ccedula='$ccedula'", $link);
$mtot_asigna=$_POST['m1']+$_POST['m2']+$_POST['m3']+$_POST['m4']+$_POST['m5'];
echo "<table border = '3' align='center' bgcolor='Silver' >";
echo "<th>Cargo</th>";
echo "<th>C Dependencia</th>";
echo "<th>Dependencia</th>";
echo "<th>Nombre</th>";
echo "<th>Cedulla</th>";
echo "</tr>";
while ($row = mysql_fetch_row($result)){
echo "<tr>";
echo "<td><INPUT type=\"text\" name=\"dcargo\" value=\"$row[0]\"></td>";
echo "<td><INPUT type=\"text\" name=\"cdependencia\" value=\"$row[1]\"></td>";
echo "<td><INPUT type=\"text\" name=\"ddependencia\" value=\"$row[2]\"></td>";
echo "<td><INPUT type=\"text\" name=\"dnombre\" value=\"$row[3]\"></td>";
echo "<th><INPUT type=\"text\" name=\"ccedula\" value=\"$row[4]\"></td>";
echo "</tr>";
echo "<tr>";
echo "<th>Monto Neto</th>";
echo "<th>Monto Letra</th>";
echo "<th>Años</th>";
echo "<th>Meses</th>";
echo "<th >Monto Total</th>";
echo "</tr>";
echo "<th><INPUT type=\"text\" name=\"mneto\" value=\"$row[5]\"></th>";
echo "<th><INPUT type=\"text\" name=\"mletra\" value=\"$row[6]\"></th>";
echo "<td><INPUT type=\"text\" name=\"n_anos\" value=\"$row[7]\"></td>";
echo "<td><INPUT type=\"text\" name=\"n_meses\" value=\"$row[8]\"></td>";
echo "<td><INPUT type=\"text\" name=\"mtot_asigna\" value=\"$mtot_asigna\"></td>";
echo "<tr>";
}
echo "</table>";
mysql_select_db("laborales", $link);
$result=mysql_query("SELECT dnombre,ccedula,mneto,mletra FROM cestafijo WHERE ccedula='$ccedula'", $link);
echo" </p><table border='5' align='center' bgcolor='Silver'>";
echo "<tr>";
echo "<th><b>Nombre</b></th>";
echo "<th><b>Cedula</b></th>";
echo "</tr>";
while ($row = mysql_fetch_row($result)){
echo "<tr>";
echo "<td><INPUT type=\"text\" name=\"nombre\" value=\"$row[0]\"></td>";
echo "<td><INPUT type=\"text\" name=\"cedula\" value=\"$row[1]\"></td>";
echo "<tr>";
echo "<th>Monto Neto</th>" ;
echo "<th>Monto en Letra</th>";
echo "</tr>";
echo "<td><INPUT type=\"text\" name=\"monto\" value=\"$row[2]\"></td>";
echo "<td><INPUT type=\"text\" name=\"montol\" value=\"$row[3]\"></td>";
echo "</tr>";
}
echo "</table>";
?>
<table align="center" >
<tbody>
<tr>
<td><INPUT type="submit" name="suma" value="suma"></td>
</tr>
</tbody>
</table>
</form> |