Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

215
Visualizações
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 Respostas
Responde à pergunta

0

Try this,

data: {'reservationData':JSON.stringify(reservationData)}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda