Forum Moderators: coopster

Message Too Old, No Replies

Including Content Using URL Variable

         

p33h

8:45 pm on Feb 9, 2009 (gmt 0)

10+ Year Member



Hi,

This is rather simple stuff but I've
got no idea about php.

I've got a page with popup, but
need no popup version to show when
there is a variable nopopup=1 in the url
such as:

www.mydomain.com?nopopup=1

What code should I use to
display normal page when there
is no variable sent with the url and
to show nopopup when the variable
is sent?

Thanks for help !

STeeL

9:57 pm on Feb 9, 2009 (gmt 0)

10+ Year Member



You should surround your popup code with:

<?php if ($_GET['nopopup'] == '1'): ?>

popup code here

<?php endif; ?>