Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/05/2013, 10:48
lehmann45
 
Fecha de Ingreso: mayo-2013
Ubicación: Estado de Mexico
Mensajes: 10
Antigüedad: 11 años
Puntos: 0
Respuesta: No funciona header("Location: www.sitio.com/pagina.html")

Este es el action.php que estoy usando

<html>
<body>
<?php
$username="xxxx";
$password="xxxx";
$database="DB";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die("<b>Unable to specified database</b>");
$nombre=$_POST['nombre'];
$appat=$_POST['appat'];
$apmat=$_POST['apmat'];
$dir=$_POST['dir'];
$mail=$_POST['mail'];
$tel=$_POST['tel'];
$cel=$_POST['cel'];
$emp=$_POST['emp'];
$puesto=$_POST['puesto'];
$url=$_POST['url'];
$dist=$_POST['dist'];
$desde=$_POST['desde'];
$marcas=$_POST['marcas'];
$tamano=$_POST['tamano'];
$fecha=$_POST['fecha'];
$columbia=$_POST['columbia'];
$m2=$_POST['m2'];
$fl360=$_POST['fl360'];
$post=$_POST['post'];
$finan=$_POST['finan'];
$evento=$_POST['evento'];
$semi=$_POST['semi'];
$noti=$_POST['noti'];
$compo=$_POST['compo'];

$query = "INSERT INTO `registro` (`nombre`, `ap-pat`, `ap-mat`, `direccion`, `email`, `tel`, `cel`, `empresa`, `puestoempresa`, `url`, `distribuidor`, `clientedesde`, `marcas`, `paquetevehi`, `fecha`, `columbia`, `m2`, `fl360`, `postventa`, `fiancial`, `eventos`, `seminuevos`, `noticias`, `componentes`, fechahora )
VALUES ('$nombre', '$appat', '$apmat', '$dir', '$mail', '$tel', '$cel', '$emp', '$puesto', '$url', '$dist', '$desde', '$marcas', '$tamano', '$fecha', '$columbia', '$m2', '$fl360', '$post', '$finan', '$evento', '$semi', '$noti', '$compo', now())";

$result = mysql_query($query);
if (! $result){
/*echo 'La consulta SQL contiene errores.'.mysql_error();*/
exit;
}else {
header("Location: www.mipagina.com/mihtml.html");
}

?>
</body>
</html>