Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

220
Vistas
My $_GET is showing me empty string as a value

When I debug my $_GET as a parameter shows value that I want to display as value and where the value is it is showing me just empty string.

enter image description here

So I want on that place to be "reservationData" and {"thename":"Maja_Bj","themovie":"1","theday":"Saturday"} to be shown as value. I already defined thename, themovie, theday. Im just having trouble with switching positions with name and value of $_GET

Here is my code:

var reservationData = {}
console.log(reservationData);
debugger;
confirmReservation.on('click', function(){

  $.ajax({
    url: '/drupal/movie-reservation',
    type: 'GET',
    cache: false,
    data: JSON.stringify(reservationData),
    success: function(data){
      if(data.status == 'success'){
        alert("Success! Your information has been saved!");
      }else if(data.status == 'error'){
        alert("Error! Please try again...");
      }
    }
  });
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try this,

data: {'reservationData':JSON.stringify(reservationData)}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda