Ver Mensaje Individual
  #10 (permalink)  
Antiguo 05/10/2010, 11:10
fideldela22
 
Fecha de Ingreso: septiembre-2010
Ubicación: Lima
Mensajes: 29
Antigüedad: 13 años, 7 meses
Puntos: 0
este es mi segundo formulario donde guardo lo del primer formulario

este es mi segundo formulario donde guardo lo del primer formulario

Código PHP:
<?php require_once('Connections/unid.php'); ?>
<?php
$campo1
=$_GET['campo1'];
$campo2=$_POST['campo2'];
$campo3=$_GET['campo3'];
include(
'../Connections/unid.php');
mysql_select_db("unid");
$sql="insert into preunid (campo1,campo2,campo3,campo4,campo5,campo6) values ('$campo1','$campo2','$campo3','$campo4','$campo5','$campo6')";
$result=mysql_query($sql,$unid);
$numreg mysql_insert_id($unid); 
$numinserciones=mysql_affected_rows($unid);
if (
$numinserciones==0)
   {
   echo 
"Error insertando registro.\n"."La Transaccion ha sido cancelada";
   }*/
?>
<?php
mysql_select_db
($database_unid$unid);
$query_w "SELECT * FROM prueba";
$w mysql_query($query_w$unid) or die(mysql_error());
$row_w mysql_fetch_assoc($w);
$totalRows_w mysql_num_rows($w);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="287" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="287"><form name="form1" method="post" action="">
        <table width="293" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="120">&nbsp;</td>
            <td width="380">&nbsp;</td>
          </tr>
          <tr>
            <td>campo 4 </td>
            <td><input name="campo4" type="text" id="campo4"></td>
          </tr>
          <tr>
            <td>campo5</td>
            <td><input name="campo5" type="text" id="campo5"></td>
          </tr>
          <tr>
            <td>campo6</td>
            <td><input name="campo6" type="text" id="campo6"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><input type="submit" name="Submit" value="Enviar"></td>
          </tr>
        </table>
    </form></td>
  </tr>
</table>
</body>
</html>
<?php
mysql_free_result
($w);
?>