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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.