hola a todos estoy intentando crear una serie de formularios en los cuales tengo campos repetidos que deberían ir rellenándose automáticamente al pasar de una pagina a otra, en la que van apareciendo los formularios hasta aquí me funciona se rellenaba los campos, pero las tablas de las base de datos no recibe los datos.
el caso es que no se como decirle al formulario para enviar los datos alas tablas, con dreamwever si que se hacerlo insertando un registro de formulario pero de esa manera no consigo pasar las variables así que hice esto pero como coloco los datos en las tablas ahora , esto de programar es un sin fin sales de una y entras en otra.
este es el código la pag1 la llamo index:
Código html:
Ver original<?php require_once('Connections/blueberryswebtiendas.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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="archivos base/estilo1.css" rel="stylesheet" type="text/css" />
<div id="cabecera">Colocar aquí el contenido para id "cabecera"
</div>
<div id="menu">Colocar aquí el contenido para id "menu"
</div>
<!--Aqui insertamos el formulario de la tabla tiendas-->
<form method="post" name="form1" id="form1" action="controlclientes/datoscliente.php"> <td nowrap="nowrap" align="right">Tienda:
</td> <td><input type="text" name="tienda" value="" size="32" /></td> <td nowrap="nowrap" align="right">Email:
</td> <td><input type="text" name="email" value="" size="32" /></td> <td nowrap="nowrap" align="right">Pasword:
</td> <td><input type="password" name="pasword" value="" size="32" /></td> <td nowrap="nowrap" align="right">Tipo_de_tienda:
</td> <td><input type="text" name="tipo_de_tienda" value="" size="32" /></td> <td nowrap="nowrap" align="right"> </td> <td><input type="submit" value="Insertar registro" /></td> <input type="hidden" name="MM_insert" value="form1" /> <div id="pie">Colocar aquí el contenido para id "pie"
</div>
pag2 la llamo datos cliente:
Código HTML:
Ver original<?php require_once('../Connections/blueberryswebtiendas.php'); ?>
<?php
session_start();
$_SESSION['tienda']=$_POST['tienda'];
$_SESSION['email']=$_POST['email'];
?>
<!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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../archivos base/estilo1.css" rel="stylesheet" type="text/css" />
<div id="cabecera">Colocar aquí el contenido para id "cabecera"
</div>
<div id="menu">Colocar aquí el contenido para id "menu"
</div>
<!--Aqui insertamos el formulario de la tabla datos_cliente-->
<form action="" method="post" name="form1" id="form1"> <td nowrap="nowrap" align="right">Nif:
</td> <td><input type="text" name="nif" value="" size="32" /></td> <td nowrap="nowrap" align="right">Nombre:
</td> <td><input type="text" name="nombre" value="" size="32" /></td> <td nowrap="nowrap" align="right">Apellidos:
</td> <td><input type="text" name="apellidos" value="" size="32" /></td> <td nowrap="nowrap" align="right">Direccion:
</td> <td><input type="text" name="direccion" value="" size="32" /></td> <td nowrap="nowrap" align="right">Ciudad:
</td> <td><input type="text" name="ciudad" value="" size="32" /></td> <td nowrap="nowrap" align="right">Pais:
</td> <td><input type="text" name="pais" value="" size="32" /></td> <td nowrap="nowrap" align="right">Codigopostal:
</td> <td><input type="text" name="codigopostal" value="" size="32" /></td> <td nowrap="nowrap" align="right">Telefono:
</td> <td><input type="text" name="telefono" value="" size="32" /></td> <td nowrap="nowrap" align="right">Movil:
</td> <td><input type="text" name="movil" value="" size="32" /></td> <td nowrap="nowrap" align="right">Email:
</td> <td><input type="text" name="email" value="<?php echo $_SESSION['email']; ?>" size="32" />
</td> <td nowrap="nowrap" align="right">Tienda:
</td> <td><input type="text" name="tienda" value="<?php echo $_SESSION['tienda']; ?>" size="32" />
</td> <td nowrap="nowrap" align="right"> </td> <td><input type="submit" value="Insertar registro" /></td> <input type="hidden" name="MM_insert" value="form1" />
<div id="pie">Colocar aquí el contenido para id "pie"
</div> <?php
mysql_free_result($tienda);
?>
gracias al que desee perder su tiempo