echo $_SESSION["kfGid"];//is 0005
$kfGid = $rs["kfGid"];//0001
echo $_SESSION["kfGid"];//actually becomes 0001
Solve the method:
1.php version parsing problem. For security reasons, you'd better not write this. Just change $kfGid to something else.
2.php.ini register_global is changed to off
In order to improve security, register_global is generally set to off