I am facing a very strange behavior with something very basic. At the beginning of my PHP script I am testing if a POST variable called “multiplicateur” is set. I am testing this in my browser by manually entering the url. The response is telling me that the post variable is not set whereas it is set in my url. Hope someone can help. Thank you in advance for your replies. Cheers. Marc.
My url:
myurl/php/calendar.php?multiplicateur=3
My PHP:
<?php
session_start();
header('Content-Type: text/html; charset=utf-8');
require("../inc/connect.inc.php");
if(isset($_POST['multiplicateur'])){
echo 'multiplicateur set';
}
else{
echo 'multiplicateur not set';
}
?>
Use
$_GET['multiplicateur']since your variable comes from URL.For more info about it, see: