Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/06/2013, 09:04
Avatar de repara2
repara2
 
Fecha de Ingreso: septiembre-2010
Ubicación: München
Mensajes: 2.445
Antigüedad: 13 años, 7 meses
Puntos: 331
Respuesta: No redirecciona a otra pagina desde un include

El código está creado con Dreamweave este es el primer problema, no podrás mantener el código. Según lo que muestras, la dirección sólo se hará cuando se realize la inserción:

Código PHP:
Ver original
  1. if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  2.   $insertSQL = sprintf("INSERT INTO tblusers (nombre, email, password) VALUES (%s, %s, %s)",
  3.                        GetSQLValueString($_POST['nombre'], "text"),
  4.                        GetSQLValueString($_POST['email'], "text"),
  5.                        GetSQLValueString($_POST['password'], "text"));
  6.  
  7.   mysql_select_db($database_conexionwhatoo, $conexionwhatoo);
  8.   $Result1 = mysql_query($insertSQL, $conexionwhatoo) or die(mysql_error());
  9.  
  10.   $insertGoTo = "index.php";
  11.   if (isset($_SERVER['QUERY_STRING'])) {
  12.     $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
  13.     $insertGoTo .= $_SERVER['QUERY_STRING'];
  14.   }
  15.   header(sprintf("Location: %s", $insertGoTo));
__________________
Fere libenter homines, id quod volunt, credunt.