![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
19/08/2014, 22:50
|
![Avatar de mazingerz](http://static.forosdelweb.com/customavatars/avatar30698_1.gif) | | | Fecha de Ingreso: febrero-2003 Ubicación: Sarasota FL
Mensajes: 147
Antigüedad: 22 años Puntos: 0 | |
_POST en XAMPP Hola a todos, estoy modificando una aplicacion que esta en uso, asi que baje todo el source code y lo tengo en mi PC. Bueno Baje el XAMP y con aptana estoy empezandoa montar el ambiente local de desarrollo.
He aqui el problema, en mi localhost cuando realizo el POST en el Login o cualquier otra pagina, me salen errores, en este puntualmentes dice:
Undefined index: colegio
NO se si existe una limitacion denenvios por POST o algun setting por que en el HOSTING esta operaivo, Localmente no trabaja.
Si alguien tuvo un problema similar, si me puede ayuda. He aca un pco del codigo
PD, Coloque el envio de colegio en duro y al momento de generar la cadena o string de envio esta alli. pero no la recibe, comente el codigo y esta en duro en una variable formPArams.
Bueno alli va.
index.php
$("#btn_iniciar_sesion").bind("click",function()
{
var formParams = "&colegio=1000069+&acc=com_usr&rut="+ $("#rut_txt").val() +"&clave=" + $("#contrasenia_txt").val() ;
$.ajax({
type : 'POST',
async : true,
url : 'index_ajax.php',
cache : false,
//data : "&acc=com_usr&rut="+ $("#rut_txt").val() +"&clave=" + $("#contrasenia_txt").val() +"&colegio=<?php echo $pagos_colegio;?>" ,
data : formParams ,
beforeSend : function()
{
if ($("#rut_txt").val()=="")
{
ds1Msj('Error',"Debe ingresar un rut");
return false;
}
if ($("#contrasenia_txt").val()=="")
{
ds1Msj('Error',"Debe ingresar una contraseña");
return false;
}
ds1Cargando("Cargando");
},
error : function() { alert("error") }, // fin error
complete : function() {}, // fin complete
success : function(data)
{
ds1Cargando("");
eval(data);
if(value.response=="true")
{
document.location.href=value.data;
}
else
{
if (String(value.data).substr(0,2)=="ER")
ds1Msj('Error',String(value.data).substr(2));
}
}
}); // fin ajax
});
....
....
....
Este es el que recibe
<?php
require "encabezado.php";
require "funciones.php";
$acc = limpia_tags($_POST["acc"]);
$rut = limpia_tags($_POST["rut"]);
$clave = limpia_tags($_POST["clave"]);
$colegio = limpia_tags($_POST["colegio"]);
.....
.....
.....
function limpia_tags($tags)
{
$tags = strip_tags($tags);
$tags = stripslashes($tags);
$tags = htmlentities($tags,ENT_QUOTES|ENT_IGNORE,"iso-8859-1");
return $tags;
} |