Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide show images


tellar

Recommended Posts

I would like to show and hide images with the click of a button. I have tried to do this by defining a variable and testing to see if it is "hide" or "show", using a form in html but easch tim i go to a new page the variable is reset

 

:blink: hmmm ive been trying all day and am at my wits end

 

 

<?php 

if(empty($hideimages)){
 echo"<FORM METHOD='post'>\n";
 echo"<input type='hidden' name='hideimages' value=''hideimages'>";  
 echo" <INPUT TYPE='submit' NAME='f' VALUE='Click Here To Hide Images'>
 </FORM>
 ";
  }else{
  echo"<FORM METHOD='post'>\n";
 echo"<input type='hidden' name='hideimages' value='showimages'>";  
 echo" <INPUT TYPE='submit' NAME='f' VALUE='Click Here To Show Images'>
 </FORM>
 ";
 }

?>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...