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 Link to comment https://forums.phpfreaks.com/topic/138372-very-basic-question/ 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 Link to comment https://forums.phpfreaks.com/topic/138372-very-basic-question/#findComment-723518 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 Link to comment https://forums.phpfreaks.com/topic/138372-very-basic-question/#findComment-723519 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 Link to comment https://forums.phpfreaks.com/topic/138372-very-basic-question/#findComment-723559 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 Link to comment https://forums.phpfreaks.com/topic/138372-very-basic-question/#findComment-723662 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.