Ok so i have a php page that makes calls to other php functions, yesterday it was working without any problem.
but today, a new day, suddenly the php it’s not accepting the variables Unity posts to it.
Here’s the php page:
<?php
require_once('******Private********');
require_once('******Private*********');
if($_REQUEST['action']=="consultarPregunta") {
$p_id_juego = $_POST['p_id_juego'];
$p_id_pregunta = $_POST['p_id_pregunta'];
echo $p_texto=consultarPregunta($p_id_juego,$p_id_pregunta);
}
elseif ($_REQUEST['action']=="obtenerNomjuego") {
$p_id_juego = $_POST['p_id_juego'];
echo $p_nombre_juego=obtenerNomjuego($p_id_juego);
}
?>
And here’s my unity script function:
IEnumerator ConsultarPregunta (){
WWWForm post = new WWWForm();
post.AddField("action","consultarPregunta");
post.AddField("p_id_juego", "1");
post.AddField("p_id_pregunta", idPregunta);
WWW consulta = new WWW(Indicadores.URL, post);
yield return consulta;
pregunta = consulta.text;
Debug.Log(consulta.text);
}
Yesterday i was receiving the text exactly as I needed it on unity, now, with the same scripts, the same unity function, the same url ffs!!, and i’m getting nothing, just an empty string.
Does anyone have any clue what could’ve happened please???.
Thank you