SkyRanger Posted November 26, 2011 Share Posted November 26, 2011 Hi Guys, This is what I am trying to do. I have multiple link one 1 page and when a user clicks on that link it will print that file for them. page.php containts 20+ images image1 - Print image2 - Print image3 - Print etc.... <a href="page.php?cid=1">Print</a> <a href="page.php?cid=2">Print</a> <a href="page.php?cid=3">Print</a> So what I need to do is if user clicks cid=2 then it goes to page.php?cid=2 shows the image and prints with javascript. That is not a problem I already to this with html but I am changing over to php mysql due to simplicity and ease of use. and also to reduce to pages from 30+ pages down to 1 page for this section. so this is what I am having trouble with switch($cid) case $cid { echo image and print } default { echo all images and print link } So the problem I am having is the case $cid The problem is that this is so simple and I have been playing with it for so long I don't see the fix. Quote Link to comment https://forums.phpfreaks.com/topic/251812-single-page-problem/ Share on other sites More sharing options...
SkyRanger Posted November 26, 2011 Author Share Posted November 26, 2011 Nevermind, got it finally, have to use switch but need to use it correctly, found my mistake. Quote Link to comment https://forums.phpfreaks.com/topic/251812-single-page-problem/#findComment-1291256 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.