Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
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 answers
Answer question

0

Try this,

data: {'reservationData':JSON.stringify(reservationData)}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!