confused and dazed Posted August 26, 2014 Share Posted August 26, 2014 Hello internet, I have several blocks of code set up for images based in html but I am also using this page to process a previous form so the file is saved as a ".php" I am using the following code to contain information: <div class="block_1"> <This is where I have an image and two radio buttons> </div> <div class="block_2"> <This is where I have an image and two radio buttons> </div> …..….. <div class="block_100"> <This is where I have an image and two radio buttons> </div> Based on how many images are available for the user to see, I would like to limit how many of these blocks appear. The page's capability is 100 of these blocks. html does not accept if() statements so how could I set it up? I can "$_POST" to a variable to use to have a count of how many images I want displayed - but how do I use that variable to display or hide blocks... some background:I need to have 100 individual blocks set up so the user can select which ones they want to add to their favorite list. However I don’t want the user to see 20 image blocks with radio buttons of images AND 80 "x" images where there is no image to load. Link to comment Share on other sites More sharing options...
thescientist Posted August 26, 2014 Share Posted August 26, 2014 I would write it out pseudo code style, just trying to feel out the logic based on what your needs are, then try and start writing it in PHP. Post in the PHP forum if you need some help with the logic. Link to comment Share on other sites More sharing options...
johncc Posted August 27, 2014 Share Posted August 27, 2014 I agree that PHP is the way to go. Generate a page containing only the selected images using PHP. Link to comment Share on other sites More sharing options...
L8V2L Posted August 29, 2014 Share Posted August 29, 2014 Or you could try to do it jsStyle. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now