Reputation: 121
i have a website with ssl , and in my website i used php header() to redirect after user login, successful query, etc. and it is working on my local host. but when i uploaded the site in my hosting with ssl certificate, the header() was not working. why?? any help or idea would be appreciated.
php scripts which are not working:
<?php
session_start();
if(!isset($_SESSION['admin'])){
header("location: index.php?You_Must_Login");
exit();
}
?>
header("Location:create_itinerary.php?Item_Added_Succesfully");
Upvotes: 3
Views: 413
Reputation: 121
Add <? ob_start(); ?>
at starting before 1st <?php
and add <? ob_flush(); ?>
at last after ?>
Upvotes: 1