Selecting albums in PHP from AJAX Photo Album
- vasilij
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
15 years 6 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:
however that is not working and "if" doesn't pass. If I change it to
then "if" always passes, no matter which album is active in address bar.
How should I check a current album in PHP? Thanks.
.....&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.
- Saka
- Offline
- Administrator
15 years 6 months ago #4341
by Saka
Emir Sakic
www.sakic.net
Try
<?php if($_GET['album']=="newphotos"): ?>
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- vasilij
- Topic Author
- Offline
- New Member
Less
More
- Thank you received: 0
15 years 6 months ago #4342
by vasilij
Yep, that worked! Thanks a lot!
Please Log in or Create an account to join the conversation.