Page 1 of 1

php include page problem

Posted: Mon Apr 19, 2004 2:38 am
by jogen143
hi,

I have a common page for navigation and member login which I have included 'include ("lhs.php")' this common page in every page in the site.

[u]Problem [/u]

When a user browse through the site and add items to the shopping cart and try to login to the site afterwards (since the login page is a include page it appears in the shopping cart pages as well) the variables used in the shoping cart were lost.

The login form (include page) calls it self and process member login. When user enter login details and submit the login form, the page reloads (as any other form) but the details in the main page (shopping cart details are lost).

I want to keep the variable on the page even if the page reloads (by user activate the login form).

Can anyone help on this

Thanks guys

cookie

Posted: Mon Apr 19, 2004 2:52 am
by samsbox
You have probably thought of this, but have u tried storing the variable as a cookie (or a secure cookie if the information is sensitive)?

Posted: Mon Apr 19, 2004 7:46 am
by Gen-ik
As well as the Cookies option you could always use a Session. This will keep any variables added to the Session 'active' until you end the Session with PHP or the user closes their browser.