Benz1 Posted December 25, 2008 Share Posted December 25, 2008 Apologies for asking such a basic question but if the link to display all photos for user ID=1 is /index.php?cmd=viewphoto&id=1 what is the operator to display photos for all users? Thanks in anticipation, Benz1 Quote Link to comment Share on other sites More sharing options...
graham23s Posted December 25, 2008 Share Posted December 25, 2008 Hi Mate, well this: cmd=viewphoto&id=1 is specifically asking for all the photos that the user id 1 is associated with, you would need to have something like: 0 or showAll at the end then do an if statement to see if the show all was found! if it was display all photos! do you have any code there mate Graham Quote Link to comment Share on other sites More sharing options...
Benz1 Posted December 25, 2008 Author Share Posted December 25, 2008 Thanks for your quick response, today of all days! I think the following is the code associated with it but as you can probably tell I'm not exactly proficient with php - elseif ($cmd == 'viewphoto') { $vid = 0; if ($loggedin) $vid = $loggeduserid; if (isset($_GET['id']) && is_numeric($_GET['id'])) $vid = $_GET['id']; $view_photo = 1; $show_header = 0; } Thanks, Benz1 Quote Link to comment Share on other sites More sharing options...
BloodyMind Posted December 25, 2008 Share Posted December 25, 2008 I agree with graham you can put another GET variable ex: show_all=1 or show=all it depends if you got multiple views or only show all Quote Link to comment Share on other sites More sharing options...
Benz1 Posted December 25, 2008 Author Share Posted December 25, 2008 I hate to push my luck but could you tell me what the syntax would be to do this using the above example? Thanks, Benz1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.