Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming > PHP Programming
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 10-07-2009, 07:55 AM
  #1
maleko
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 1
iTrader: (0)
maleko is an unknown quantity at this point
create hidden image div that only appears when certain values are selected in select

What is the best way to create an image div that only displays an image when a select option equals certain values.
It should display a corresponding image to the select option.

Thank you

Last edited by maleko : 10-08-2009 at 04:00 AM.
maleko is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-19-2009, 07:00 AM
  #2
cono1616
Battler (Level 3)
 
Join Date: Aug 2008
Posts: 22
iTrader: (0)
cono1616 is an unknown quantity at this point
I think this would require more javascript than anything. But if you wanted a submit button to make the image appear :

PHP Code:
<?php
//Defines Variables
$$_POST['button1'];
$
$_POST['button2'];

//Lets see what button was pressed

if ($1){
echo 
"<img src=\"image.gif\" title=\"blah\" alt=\"blah\" />";
} else {
echo 
"";
}

//Checks to see if user submitted form.
if (isset($_POST['submit'])){

//If no submit, echo form.
} else {
?>
<form action="FILENAME.php" method="post">
<input type="radio" name="button1" value="A" />Button 1 (Will show image_ <br /><br />
<input type="text" name="button2" value="B" />Button 2 (will not show the image)<br /><br />
<input type="submit" name="submit" value="Go" />
</form>

<?php
}
?>
Hope that helps.
cono1616 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 03:29 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.