Hola amigos, tengo un problema tengo una tabla que contiene varios datos cedula, nombre_apellido, fecha_nacimiento, edad y en mi formulario igualmente cedula, nombre_apellido, fecha_nacimiento, edad y cedula1, nombre_apellido1, fecha_nacimiento1, edad1 cuando envio el formulario solo se guarda la primera linea que no contiene el numero 1 al final, la segunda linea queda en blanco no guarda ningun dato, quien me pueda echar una mano le estare muy agradecido.
aqui el codigo:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<?php
include"conexion.php";
include"conector.php";
error_reporting(E_ALL ^ E_NOTICE);
$cedula = $_POST['cedula'];
$nombre_apellido = $_POST['nombre_apellido'];
$parentesco = $_POST['parentesco'];
$fecha_nacimiento = $_POST['fecha_nacimiento'];
$edad = $_POST['edad'];
$insertSQL = "INSERT INTO prueba (cedula, nombre_apellido, parentesco, fecha_nacimiento, edad) VALUES ('$cedula','$nombre_apellido','$parentesco','$fecha_nacimiento','$edad'),
('$cedula1','$nombre_apellido1','$parentesco1','$fecha_nacimiento1','$edad1')";
$result = mysql_query($insertSQL);
?>
<link href="estilo/todos.css" rel="stylesheet" type="text/css">
<form action="prueba.php".php" method="post">
<table width="786" border="1">
<tr>
<td width="30">N°</td>
<td width="180">Cedula de Identidad</td>
<td width="180">Nombres y Apellidos</td>
<td width="180">Parentesco</td>
<td width="144">Fecha de Nacimiento</td>
<td width="32">Edad</td>
</tr>
<tr>
<td>1</td>
<td><input type="int" name="cedula" size="30" maxlength="70"/></td>
<td><input type="varchar" name="nombre_apellido" size="30" maxlength="70"/></td>
<td><input type="varchar" name="parentesco" size="30" maxlength="70"/></td>
<td><input type="date" name="fecha_nacimiento" step="1" min="2015-01-01" max="2070-12-31" value="2015-01-01"/></td>
<td><input type="varchar" name="edad" size="3" maxlength="3"/></td>
</tr>
<tr>
<td>2</td>
<td><input type="varchar" name="cedula1" size="30" maxlength="70"/></td>
<td><input type="varchar" name="nombre_apellido1" size="30" maxlength="70"/></td>
<td><input type="varchar" name="parentesco1" size="30" maxlength="70"/></td>
<td><input type="date" name="fecha_nacimiento1" step="1" min="2015-01-01" max="2070-12-31" value="2015-01-01"/></td>
<td><input type="varchar" name="edad1" size="3" maxlength="3"/></td>
</tr>
</table>
</br>
<div align="center">
<td><input type="submit" value="Guardar" /></td>
</div>
</body>
</html>