title: How to get the larger image in another page when clicked on small image using SESSION
body: <p>I'm working with images for a website. I have an two images one is smaller and other is larger in sizes. When I click on the image of small one, in another page, larger image should be seen. I'm using SESSIONS to send larger image path to the another page.</p>
  
  <p>Below code for small image:</p>
  
  <pre><code>echo "&lt;div id='ru'&gt;
   &lt;a href='lrgimgview.php'&gt;&lt;img src='".$path."'/&gt;&lt;/a&gt;
       &lt;p&gt;Muggu ".$imagenumber[$i]."&lt;/p&gt;
       &lt;/div&gt;";
  $_SESSION['lrgimgv']=$imagepathl;
  </code></pre>
  
  <p>$path has the path of smaller image</p>
  
  <p>$imagepathl has the path of larger image,
  when I click on link i.e on image, larger image is shown in another page.</p>
  
  <p>In the another page('lrgimgview.php') </p>
  
  <pre><code>&lt;img src="&lt;?php echo $_SESSION['lrgimgv']; ?&gt;"&gt;
  </code></pre>
  
  <p>The above code works fine for single image.</p>
  
  <p>Now, I have multiple images.</p>
  
  <p>How to get the larger image in another page when clicked on small image?</p>
  
  <p>I tried something like this</p>
  
  <pre><code>foreach($imagepath as $i =&gt;$path)
  {
  
  $imagepathl[$i]=$lPath;     
  
  echo "&lt;div id='ru'&gt;
  &lt;a href='lrgimgview.php'&gt;&lt;img src='".$path."'/&gt;&lt;/a&gt;
  &lt;p&gt;Muggu ".$imagenumber[$i]."&lt;/a&gt;
  &lt;/div&gt;";
  }
  </code></pre>
  
  <p>Able to see the smaller images in a page, but when clicked on smaller image, not getting the larger image in another page.</p>
  
  <p>Please help me.</p>
  
  <p>Thank you.</p>