Here’s how it works. If a user clicks on the link to list the products then they will be directed to the products page. For security, I set something at the beginning to assure that either ‘cid’ or ‘sid’ is set. I am sure that the users are going to a page linked with cid or sid because it says it as I hover over it in my browser. Here’s the code
<?php require("includes/header.php"); ?>
<?php
if(!isset($_GET['cid'])||!isset($_GET['sid'])) {
header("Location: index.php");
}
unfortunately, the users are still directed. I will post more of the code if necessary.
Your code requires that both
$_GET['cid']and$_GET['sid']are defined, not that one of them is. Replace||with&&in your condition.