Author Topic: Selecting albums in PHP from AJAX Photo Album  (Read 1733 times)

vasilij

  • Newbie
  • *
  • Posts: 5
    • View Profile
Selecting albums in PHP from AJAX Photo Album
« on: 06 May 2009, 23:41 »
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:

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

Code: [Select]
<?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.

Saka

  • Administrator
  • Hero Member
  • *****
  • Posts: 2,495
    • View Profile
    • Sakic.Net
Re: Selecting albums in PHP from AJAX Photo Album
« Reply #1 on: 07 May 2009, 03:58 »
Try
Code: [Select]
<?php if($_GET['album']=="newphotos"): ?>

vasilij

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Selecting albums in PHP from AJAX Photo Album
« Reply #2 on: 07 May 2009, 06:44 »
Yep, that worked! Thanks a lot! :)