Jump to content

Select button w/ image and have that image display on another page


soccerrprp1

Recommended Posts

I assume when you mean PHP only you are not involving a database...

 

So if that is the case, have each radio button assigned a value.  When submitted, get the value.  In your PHP, tell it something like:

 


$value = $_GET['submittedvalue'];

if ($value == 1) {
   echo "<img src=image/image1.jpg>";
} elseif  {
($value == 2) {
   echo "<img src=image/image2.jpg>";
}

 

Just repeat until you've used all your images.  Of course, make sure it is secure and if you are using a database you can make it more elegant.

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.