I believe this can be done like this:
$url = "profile?id=".$_GET['id'];
if($_GET['goto'] == $url){
require_once('profile.php');
}
another thing, I realized that this can be done like this:
if(isset($_GET['goto']) && $_GET['goto']=="profile"){
if(isset($_GET['id'] || $_GET['id']==''){
header("Location: profile.php");
}
}
source
share