Jump to content

Single page problem


SkyRanger

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/251812-single-page-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.