我需要有一个有效的客户表。
它有效但当我离开页面并返回页面时,它不会将自己设置为活动或正确。但当我离开页面并再次返回时,它会将自己设置为活动状态。
我做错了什么?
if (!isset($_COOKIE['ActiveLead'])) $_GET['ActiveLead'] = 0;
else
$tchecked = $_COOKIE['ActiveLead'];
if ($tchecked == 1) {
$_GET['ActiveLead'] = 1;
$title="Active Leads";
} else {
$_GET['ActiveLead'] = 0; }
if (($_GET['ActiveLead'] == 1) || ($_COOKIE['ActiveLead'] == '1')) {
$t1v="checked";
setcookie("ActiveLead", 0, time()+60*60*24*365);
} else {
$t1v="";
setcookie("ActiveLead", 1, time()+60*60*24*365);
}
$ActiveLead_frLeads = "%";
if (isset($_GET['ActiveLead'])) {
$ActiveLead_frLeads = $_GET['ActiveLead'];
SELECT * FROM Leads WHERE (Leads.LeadNo = %s) OR (Leads.Active >= %s) ORDER BY `Date` DESC"
我是否需要进行会话?