Hi, i just done with swap images in javascripts and is works great, but i’m trying to figure out how to add write that code with session veriable in php.
As you can see the code on the bottom that showing our thumbnail images and every time click on one of the thumbnail it will show bigger same images.
For sample that they are five thumbnail images of (red, yellow, blue, black flowers) and every time to click on on eof thumbnail it wills how same images but bigger images.
now my next step is that to add session variable, so let say that person click images number two, which is images of red flow, then when press key F5 or reload browser or it should show up same red flow images instead of default images.
how can i write that code with session variable in php with that!
Here is code please help me thanks.
[CODE]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>
<body>
<script type=”text/javascript”><!–
function LoadGallery(image, UrlFrom){
if(typeof UrlFrom == “object” || UrlFrom == “[object]”){
document.getElementById(image).src = UrlFrom.src;
}else{
document.getElementById(image).src = UrlFrom;
};
};
//–>
</script>
…..
<div id=”littlepics”>
<div id=”bigpic”>
<img src=”jenny/one.jpg” width=”480″ height=”320″ id=”bigimage”>
<p>Step 1: Meet in person – do not rely on email or the telephone.</p>
</div>
<img src=”jenny/one.jpg” onclick=”LoadGallery(‘bigimage’,this);”>
<img src=”jenny/two.jpg” onclick=”LoadGallery(‘bigimage’,’jenny/two.jpg’);”>
<img src=”jenny/three.jpg” onclick=”LoadGallery(‘bigimage’,’jenny/three.jpg’);”>
<img src=”jenny/four.jpg” onclick=”LoadGallery(‘bigimage’,this);”>
<img src=”jenny/five.JPG” onclick=”LoadGallery(‘bigimage’,this);”>
</div>
</body>
</html>