why header function does not work here ? it work successfully on localhost
<?php
session_start();
if(isset($_POST['submit'])){
require_once('models/config.php'); require_once('models/mysql.class.php');
$username=$_POST['username'];
$password=$_POST['password'];
$obj_Pharmacies=new mysql();
$sql_query="SELECT * FROM `sellers_accounts` WHERE`user_name`='$username' AND `password`='$password'";
$obj_Pharmacies->Execute($sql_query);
if($obj_Pharmacies->Execute($sql_query)){
$Pharmacies=$obj_Pharmacies->GetRows();
$cookie_seller_name=$Pharmacies[0]['name'];
$cookie_seller_user_name=$Pharmacies[0]['user_name'];
$Pharmacies_number=count($Pharmacies);
if($Pharmacies_number>=1){
//$_SESSION['sellerName']=$cookie_seller_name;
setcookie('sellerName', $cookie_seller_name, time() + (86400 * 30), "/");
//$_SESSION['sellerUsername']=$cookie_seller_user_name;
//$_SESSION['sellerName'];
header("location:plans.php");
}
}
}
?>