Muy buenos días!
Muchas gracias por tu respuesta.
Lo que tengo hasta el momento es lo sicguiente, ya he recuperado el id del cliente por medio del GET y lo he enviado al formulario del producto. Es decir cuando le doy clic al boton de agregar nueva orden se abre el formulario del producto con el id del cliente. Ahora lo que pasa es que cuando envío el formulario, me sale el siguiente error : Undefined variable lines 8-9-11. Claramente estas variables se me están yendo vacias apesar que la información se envío del formulario anterior. Ya he modificado el código varias veces y aún no sé en que estoy fallando. Agreggo el código.
Saludos y muchas gracias!
Código PHP:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CTE Modificar Registro</title>
<?php
include "conexiondblocal.php";
$serial = mysqli_real_escape_string($con,$_GET['cedula']);
$qry="SELECT * FROM clientes WHERE cedula = $_GET[cedula]";
$muestra = mysqli_query($con,$qry);
$person=$muestra->fetch_array();
?>
<style type="text/css">
#cuerpo form table {
text-align: center;
}
</style>
</head>
<body>
<div id="cuerpo">
<div id="formulario"></div>
<p>
<script>
$( "#inputentregaacliente,#inputfecharecepcion").datepicker();
</script>
r</p>
<form name="form1" method="post" action="formproducto2.php">
<table width="685" border="0">
<tr>
<td width="271">Producto </td>
<td width="404"><label for="producto">
<input type="text" name="producto" id="producto">
</label></td>
</tr>
<tr>
<td><label for="inputcedula2">Cédula</label></td>
<td><input name="inputcedula"type="text" id="inputcedula" value = "<?php echo $person['cedula']; ?>" /></td>
</tr>
<tr>
<td>tipodeservicio</td>
<td><input type="text" name="tipodeservicio" id="tipodeservicio"></td>
</tr>
<tr>
<td>numeromarca</td>
<td><input type="text" name="numeromarca" id="numeromarca"></td>
</tr>
<tr>
<td>marca</td>
<td><label for="modelo">
<input type="text" name="marca" id="marca">
</label></td>
</tr>
<tr>
<td>modelo </td>
<td><label for="almacen">
<input type="text" name="modelo" id="modelo">
</label></td>
</tr>
<tr>
<td>almacen</td>
<td><label for="dano">
<input type="text" name="almacen" id="almacen">
</label></td>
</tr>
<tr>
<td height="16">dano </td>
<td><label for="fecharecepcion">
<input type="text" name="dano" id="dano">
</label></td>
</tr>
<tr>
<td height="16">fechrecepcion </td>
<td><input type="text" name="fecharecepcion" id="fecharecepcion"></td>
</tr>
<tr>
<td height="16">tecnico</td>
<td height="16"><label for="tecnico"></label>
<input type="text" name="tecnico" id="tecnico"></td>
</tr>
<tr>
<td height="16">estado </td>
<td height="16"><label for="estado"></label>
<input type="text" name="estado" id="estado"></td>
</tr>
<tr>
<td height="16">sede</td>
<td height="16"><label for="sede"></label>
<input type="text" name="sede" id="sede"></td>
</tr>
<tr>
<td height="16">entregaacliente</td>
<td height="16"><label for="entregaacliente"></label>
<input type="text" name="entregaacliente" id="entregaacliente"></td>
</tr>
<tr>
<td height="16"> </td>
<td height="16"> </td>
</tr>
<tr>
<td height="16" colspan="2"><input type="submit" name="enviar" id="enviar" value="Submit"></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</form>
<?php
if (isset($_POST ['enviar'])){
$serial = mysqli_real_escape_string($con,$_POST['']);
$producto="INSERT INTO producto (producto,cedula,tipodeservicio,numeromarca,marca,modelo,almacen,dano,fecharecepcion,tecnico,estado,sede,entregaacliente) VALUES('$_POST[producto]','$_POST[cedula]','$_POST[tipodeservicio]','$_POST[numeromarca]','$_POST[marca]','$_POST[modelo]','$_POST[almacen]','$_POST[dano]','$_POST[fecharecepcion]','$_POST[tecnico]','$_POST[estado]','$_POST[sede]','$_POST[entregaacliente])";
mysqli_query($con,$producto);
echo "El usuario ha sido modificado";
}
?>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</div>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>