stevenjweir Posted December 6, 2010 Share Posted December 6, 2010 Ok so I have a website with two types of photo gallerys. Model Cars and Model Planes. The galleries are becoming so big that I need to add an archive link to the galleries, but it's messy to have the archive link there until we actually enable the archived photos. So what I want to do is show the DIV with the archive link in it if the page can find database a 1 in the model_pictures.car_gallery AND model_pictures.archive. How would I achieve this? The page is already connected to the database as it's pulling the images and information for the gallery. I need it to scan the entire 'archive' column in the database and also the 'car_gallery' and if it finds 1's in there AND the car_gallery then to show the link. What I would like to avoid, as I have two galleries, is having the archive link show on the car gallery when it finds a 1 in the archives column, but that archive is for a plane_gallery photo. Hence why I would like to have check both car_gallery + archive and then plane_gallery + archive. Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/220827-hiding-a-div-if-two-database-values-both-1-little-help-please/ Share on other sites More sharing options...
Rifts Posted December 6, 2010 Share Posted December 6, 2010 maybe what you could do is something like this. <? check database for 1 or whatever you want if == 1 { echo 'show div'; } else { echo ''; } ?> i hope that makes sense Link to comment https://forums.phpfreaks.com/topic/220827-hiding-a-div-if-two-database-values-both-1-little-help-please/#findComment-1143655 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.