Hello i have a strange problem with $_GET method, i created the method with this code in JS :
function qget () {
var data = new URLSearchParams();
var DateStart = Digit.join("");
//DateStart = DateStart.substr(2, 3);
data.append("Dates",DateStart);
data.append("Intervalle", Intervalle);
data.append("Base", DB);
data.append("Checkboxes",Boxes);
// (B) URL + REDIRECT
var url = "index.php?" + data.toString();
location.href = url;
}
and i have this result on the navigation bar :
So i have all my variable names and values then i have the following code to load the values :
if(isset($_GET["Base"])) {$DB = $_GET["Base"];} // get Date from HTTP GET
else {$DB="Locale";}
$Intervalle = !empty( $_GET['Intervalle'] ) ? intval( $_GET['Intervalle'] ) : 30;
if(isset($_GET["Checkboxes"])) {$Checkboxes = $_GET["Checkboxes"];}
else {$Checkboxes="checkboxAcheckboxBcheckboxC";}//Choose A,B,C by defaut
So the result is working with variable name $Intervalle and $Base but not with $Checkboxes, it’s always passing to the else choice as it didn’t find the variable $Checkboxes. If someone can understand why ? Thanks