Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/05/2013, 21:42
Avatar de 4l3XZ
4l3XZ
 
Fecha de Ingreso: mayo-2013
Mensajes: 5
Antigüedad: 11 años
Puntos: 0
Php no vuelca los datos a MySql

Bueno Utilizo un ordenador con un servidor php, mysql y apache en Debian 6 Squeeze, mi problema es que a pezar de que no arroja ningún error, tampoco los datos ingresados se ven reflejados en mi base de datos. Aquí el código:




<?php
include ('mods/funciones.php');

if (verificar_usuario()){
print "<a href='Salir.php'/>Desconectarse</a>";
} else {
header('Location:index.php');
}
?>
<Html>
<head><title>Admin</title>
</head>
<Body>
<h1>Banner</h1><br>
<Form name="ingreso" method="Post" action="Subir_Banner.php">
Titulo:<Input type="text" name="Titulo"><br>
Contenido:<Input type="text" name="Contenido"><br>
Fecha:<Input type="text" name="Fecha"><br>
Lugar:<Input type="text" name="Lugar"><br>
<input type="submit" name="Enviar" value="Enviar" >
</Body>
</Html>

<?php

if (isset($_POST['Enviar'])){
$Titulo=$_POST['Titulo'];
$Contenido=$_POST['Contenido'];
$Fecha=$_POST['Fecha'];
$Lugar=$_POST['Lugar'];

mysql_query("insert into banner(Titulo,Contenido,Fecha,Lugar) values ('$Titulo','$Contenido','$Fecha','$Lugar')", mysql_connect("localhost", "root", "toor"));
}
?>


Muchas gracias por su tiempo.