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

867
Views
Disminución: clave de matriz indefinida al intentar almacenar variables de publicación (xmlhttprequest)

Estoy tratando de guardar los datos que "buchen.php" obtiene en las variables de php pero sigo recibiendo el siguiente error

Advertencia: clave de matriz no definida "reise_id" en buchen.php en la línea 4

Advertencia: clave de matriz no definida "platz_geb" en buchen.php en la línea 5

¿Alguien puede decir qué podría estar mal aquí?

 var xhr = new XMLHttpRequest(); xhr.open('POST', 'buchen.php'); xhr.setRequestHeader('Content-Type', 'application/json'); xhr.send(JSON.stringify({ reise_id: "<?php echo $reise_id; ?>", platz_geb: platz_blau }));
 //buchen.php $reise_id = $_POST['reise_id']; $platz_geb = $_POST['platz_geb'];
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

En lugar de tomar las variables POST como siempre, intente lo siguiente en el código PHP:

 $json = file_get_contents('php://input'); echo $json;
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!