New question

Question:

Date: 17-08-2022 21:06:16 (In Spanish)

Pasar una variable javascript a php dentro de un foreach[Unresolved]

Buenas noches amigos serian tan amable de poder ayudarme este es mi problema al calcular las fechas solo me muestra para el primer id los dias y para el segundo id no me muestra.. Tags: Javascript - PHP7 Votes: 0 - Answers: 2 - Views: 8 Share on: Google Facebook Twitter LinkedIn Link
 

Answers:

  • Date: 31-08-2022 04:06:36 ¿Podrías dar más detalles y colocar tu código para entender qué es lo que pasa? Recuerda que puedes pasar variables de php hacia javascript, pero no en sentido contrario (excepto por llamadas AJAX).   Votes: 0 - Link answer
     
  • Date: 24-05-2023 19:56:36 var myVariable = "mi valor"; // Aquí establece el valor de tu variable

    // Realiza la solicitud AJAX al servidor
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
    // La solicitud AJAX se ha completado correctamente
    console.log(this.responseText); // Aquí puedes manejar la respuesta del servidor
    }
    };

    xmlhttp.open("GET", "archivo_php.php?variable=" + myVariable, true);
    xmlhttp.send();
      Votes: 0 - Link answer
     
To actively participate in the community first must authenticate, enter the system.Sign In
 
frjcbbae garagebible.com