Selecting albums in PHP from AJAX Photo Album

14 years 11 months ago #4340 by vasilij
I am planning to make a description of Photo album depending on which album is currently showing. As I can see in address bar, it gives  "album"  variable, for example
.....&album=newphotos#1

I have tried to check which album is active using this:
<?php if($album=="newphotos"): ?>

however that is not working and "if" doesn't pass. If I change it to
<?php if($album!="newphotos"): ?>

then "if" always passes, no matter which album is active in address bar.

How should I check a current album in PHP? Thanks.

Please Log in or Create an account to join the conversation.

14 years 11 months ago #4341 by Saka
Try
<?php if($_GET['album']=="newphotos"): ?>

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

14 years 11 months ago #4342 by vasilij
Yep, that worked! Thanks a lot! :)

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch