为什么标题功能在这里不起作用? 在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");
}
}
}
?>
答案 0 :(得分:1)
答案 1 :(得分:1)
$base_url = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$redirect_url = $base_url."plans.php";
header("location:$redirect_url");