Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

If session exists, help?


cunga_lunga

Recommended Posts

Hello,

 

this is my problem. I have a pop up banner on my site which must appears only once when someone come to my site, to the home page of the site. For example if than someone click on any link, and than go back to home page , the banner should NOT appear!

 

Only way that I see this happening is to see if the session is started.

 

I already have in my index.php code that looks something like this:

 

<?php if (SOMETHING) SHOW BANNER
else DO NOT SHOW BANNER

 

This SOMETHING is currently set to see if someone is on first, home page of the site or its has been clicked on any Manufacturer or Category (because that way index.php it being used.).

 

Now I would like to change that condition so that check if session is started? Can anyone help my with that? This should be a simple code!

 

If anyone see another way to resolve this, please say.

 

Thank you in advance!

Link to comment
Share on other sites

  • 2 months later...
OK let me put it this way:

 

can anyone just tell me how I can check if the session exists, I will figure out the rest myself.

 

Thank you.

 

I just figure it out

 

if ($session_started == false) { SHOW THIS }

 

is probably all you need

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...