I have two web pages admin.php and user.php. admin.php has control over user.php.
I have 4 controls(buttons) in admin.php that 2 of them are for changing the template(appearence) of admin.php and work fine (I did it using cookie).
2 other controls(buttons) are for changing the template for user.php.
But I don’t know how to achieve this?
Should I pass the cookies from admin.php to user.php? If so, how should I pass them? Or maybe I should use JavaScript?
Please help me with this problem.
If your two pages are set on the same domain, then you shouldn’t have any trouble sharing cookies between the two.
You just have to make sure you specify the correct domain. Use an absolute path instead of a relative one.
ex:
Suggestion:
Since you’re using php, why not using it to specify the template? Since it’s a user configuration, you probably want it to last regardless of the user clearing the cookies.