I have the following table in my database:
I want that depending on the values of android, ios etc a different url is shown. For example if android is 1 for this user, it shows the android website.
The code I have used is the following but I am getting 'undefined index' when doing the get:
<?php
$sql = "SELECT android, ios, macos, linux, windows FROM users";
$result = mysqli_query($con, $sql);
$ios = $_GET["ios"];
$android = $_GET["android"];
if ($ios == 1) {
header("Location: ../consejos/ios.html");
die();
} elseif ($android == 1) {
header("Location: ../consejos/ios.html");
die();
}
?>