no me va el header ni me va nada....AYUDA
    
		    Pues vereis, este error me sale:
Notice: Undefined variable: nombre in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: apellidos in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: nif in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: direccion in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: telefono in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: password in c:foxservwwwregistrador2.php on line 13
Warning: Cannot add header information - headers already sent by (output started at c:foxservwwwregistrador2.php:5) in c:foxservwwwregistrador2.php on line 28
Os pongo el codigo del registrador2.php:
<html>
<body>
<?php
$basedatos = "alumnos";
$link = @mysql_connect("localhost", "root", "");
mysql_select_db($basedatos,$link);
$sql = "INSERT INTO datosalumnos VALUES ('$nombre', '$apellidos', '$nif', '$direccion', '$telefono', '$password')";
if (@mysql_db_query($basedatos, $sql, $link)) {
//mostramos la pantalla de que todo ha salido satisfactoriamente
Header("Location: http://localhost/enviar.htm");
}
else {
//Mostramos que ha habido un error y q debe intentarse mas tarde.
Header("Location: http://localhost/errorregistrando.htm");
}
?>
</body>
</html>
Y no se pq las variables no estan definidas, pq proceden de un formulario cuyo action es el siguiente:
<form name="form1" method="post" action="registrador2.php">
Ayuda por favor!!!!!!!!!
Estoy atascado!!!!
Ni se me agregan los registros a la base de datos, ni se me redirecciona a la pagina con el Header...
    Notice: Undefined variable: nombre in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: apellidos in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: nif in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: direccion in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: telefono in c:foxservwwwregistrador2.php on line 13
Notice: Undefined variable: password in c:foxservwwwregistrador2.php on line 13
Warning: Cannot add header information - headers already sent by (output started at c:foxservwwwregistrador2.php:5) in c:foxservwwwregistrador2.php on line 28
Os pongo el codigo del registrador2.php:
<html>
<body>
<?php
$basedatos = "alumnos";
$link = @mysql_connect("localhost", "root", "");
mysql_select_db($basedatos,$link);
$sql = "INSERT INTO datosalumnos VALUES ('$nombre', '$apellidos', '$nif', '$direccion', '$telefono', '$password')";
if (@mysql_db_query($basedatos, $sql, $link)) {
//mostramos la pantalla de que todo ha salido satisfactoriamente
Header("Location: http://localhost/enviar.htm");
}
else {
//Mostramos que ha habido un error y q debe intentarse mas tarde.
Header("Location: http://localhost/errorregistrando.htm");
}
?>
</body>
</html>
Y no se pq las variables no estan definidas, pq proceden de un formulario cuyo action es el siguiente:
<form name="form1" method="post" action="registrador2.php">
Ayuda por favor!!!!!!!!!
Estoy atascado!!!!
Ni se me agregan los registros a la base de datos, ni se me redirecciona a la pagina con el Header...
		    El Header no funciona porque ya tienes cosas escritas en pantalla ej "<html><body>".
borra estas etiquetas y funcionarà.
Con respecto al error de variables no definidas, debes manipular el php.ini en variables globales verdadero
    borra estas etiquetas y funcionarà.
Con respecto al error de variables no definidas, debes manipular el php.ini en variables globales verdadero
		    Ey!! si colocas este script  te reireccionara!
<script language="JavaScript">
<!--
location.replace("xxxxxx.php")
-->
</script>
Pruebalo y me dices!! y lo de las variables undefined tienes que buscar el fichero PHP.INI la linea que dice REGISTRE_GLOBALS y si esta en OFF lo colocas a ON vale! ya me diras tambien si te va! vale!!
    <script language="JavaScript">
<!--
location.replace("xxxxxx.php")
-->
</script>
Pruebalo y me dices!! y lo de las variables undefined tienes que buscar el fichero PHP.INI la linea que dice REGISTRE_GLOBALS y si esta en OFF lo colocas a ON vale! ya me diras tambien si te va! vale!!
