Header location problem

im having issues with me header location function,on my localhost it worked but here its just blank

<?php include("db.php"); require_once('config.php'); if(isset($_SESSION['access_token'])){ header("Location: fblogin.php"); exit(); } $redirectTo = "http://willies.rf.gd//willies/callback.php"; $data = ['email']; $fullURL = $handler->getLoginUrl($redirectTo, $data); ?>

You are not allowing sessions to be used on your code. To allow it. try this:

<?php
session_start() //<-- never forgot it
 include("db.php");
 require_once('config.php'); if(isset($_SESSION['access_token'])){ 
header("Location: fblogin.php"); 
exit(); 
} 
$redirectTo = "http://willies.rf.gd//willies/callback.php"; 
$data = ['email']; 
$fullURL = $handler->getLoginUrl($redirectTo, $data); ?>
2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.