Dear Janson,
Thanks for your help it is working as you mentioned.
Could you give me one more advice for the following issue.
There is a wish list button in product detail page and I would like to redirect to the login page if the customer has not logged in. I use the following codes (exactly same code for login link) but I got the following errors. Could you tell me what am I missing?
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/clothw5/public_html/Detail/Dress_Jumpsuit/12572.php on line 50
My code is as follows:
$gotologin = "../../login.php?accesscheck=<?php echo (urlencode($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):"")));?>";
if (!isset($_SESSION['Customer_Code'])) {
header(sprintf("Location: %s", $gotologin));
}