Forums / General Questions / If NOT logged in, image shows. If logged in, image does not show

If NOT logged in, image shows. If logged in, image does not show

Locked

Views: 969

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
23 Oct 2009, 7:14 PM
#1
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

If NOT logged in, image shows. If logged in, image does not show

Please help with:

if ($_SESSION['customer_id'])

I need to modify it to do this.

If there IS a customer session, then image does NOT display.

If there IS NOT a customer session, then image DOES display.

(Ideally, it will be the latter... IF NO SESSION WITH CUSTOMER ID, then DISPLAY IMAGE)

20 years a Zencart User

24 Oct 2009, 10:53 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: If NOT logged in, image shows. If logged in, image does not show

if ($_SESSION['customer_id']) {
//don't display the image
}else{
//display the image
}

or

if (!$_SESSION['customer_id']) {
//display the image
}

Nick
iszent.com

25 Oct 2009, 9:43 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: If NOT logged in, image shows. If logged in, image does not show

Thanks Nick... I reeally need to brush up on my php! :blush:

20 years a Zencart User