
18/02/2010, 06:59
|
| | Fecha de Ingreso: febrero-2010
Mensajes: 5
Antigüedad: 15 años Puntos: 0 | |
duda PhP
Código:
<!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=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<form action="rellenaspelis.php" method="post">
<input name="titulo" type="text" value="titulo " />
<input name="tipo" type="text" value="tipo" />
<input name="distribuidor" type="text" value="distribuidor" />
<input name="director" type="text" value="director" />
<input name="actor1" type="text" value="actor1 " />
<input name="actor2" type="text" value="actor2" />
<input name="año" type="text" value="año" />
<input name="duracion" type="text" value="duracion" />
<input name="genero" type="text" value="genero" />
<fieldset><legend>edad</legend><input name="edad" type="radio" value="tp" />Todos los Publicos
<input name="edad" type="radio" value="+7" />Mas de 7
<input name="edad" type="radio" value="+13" />Mas de 13
<input name="edad" type="radio" value="+18" />Mas de 18</fieldset>
<input name="sinopsi" type="text" value="sinopsi" />
<input name="imagen" type="file" /> Indicar ruta de imagen
<input name="fecha_alquiler" type="text" value="fecha_alquiler" />
<input name="ctl_fecha_alta" type="text" value="ctl_fecha_alta" />
<input name="ctl_usuario_alta " type="text" value="ctl_usuario_alta " />
<input name="precio_venta" type="text" value="precio_venta" />
<fieldset><legend>¿vendido?
<input name="vendido" type="radio" value="si" />Si
<input name="vendido" type="radio" value="no" />No
</fieldset>
<fieldset><legend>Tipo pelicula
<input name="categoria" type="radio" value="estreno" />Estreno
<input name="categoria" type="radio" value="preestreno" />Preestreno
<input name="categoria" type="radio" value="novedad" />Novedad</fieldset>
<input name="enviar" type="submit"value="enviar" />
</form>
</body>
</html>
Todo este chozikako es el formulario .... que lo mando a rellenaspelis.php
Código:
<html>
<body>
<?php
$_SESSION['titulo']=$titulo;$_SESSION['tipo']=$tipo;$_SESSION['distribuidor']=$distribuidor;$_SESSION['director']=$director;$_SESSION['$actor1']=$actor1;$_SESSION['actor2']=$actor2;$_SESSION['año']=$año;$_SESSION['duracion']=$duracion;$_SESSION['genero']=$genero;$_SESSION['edad']=$row['edad'];$_SESSION['sinopsi']=$sinopsi;$_SESSION['imagen']=$imagen;$_SESSION['fecha_alquiler']=$fecha_alquiler;$_SESSION['ctl_fecha_alta']=$ctl_fecha_alta;$_SESSION['ctl_usuario_alta']=$user;$_SESSION['ctl_usuario_alta']=$ctl_usuario_alta;$_SESSION['precio_venta']=$precio_venta;$_SESSION['vendido']=$vendido;$_SESSION['categoria']=$categoria;
$link = mysql_connect("localhost", "root");
mysql_select_db("proyecto",$link);
$sql = "INSERT INTO tbl_dst_titulos(titulo,tipo, distribuidor,director,actor1,actor2,año,duracion,genero,edad,
sinopsi,imagen,fecha_alquiler,ctl_fecha_alta,ctl_usuario_alta,precio_venta,vendido,categoria)";
$sql .="VALUES('$titulo','$tipo','$distribuidor','$director'
,'$actor1','$actor2','$año','$duracion','$genero'
,'$edad','$sinopsi','$imagen','$fecha_alquiler','$ctl_fecha_alta','$ctl_usuario_alta','$precio_venta','$vendido','$categoria')";
$result = mysql_query($sql);
echo"<a href mostrardependienteformu.php> volver atras </a> <br>";
?>
</body>
</html>
No me sale ningun error...... pero no lo manda. :S ¿donde esta el error? le paso todos los valores por $ .
Weno muchas gracias .Y espero a ver si descubro la solucion pero mientras ¿podriais exarle un ojillo? a ver si no he visto algo ...
Lo que quiero es que se guarde en la base de datos y no lo hace |