title: Pass php value of a selected Submit image
body: <p>I have an image swiper, that changes between 3 images accoording to the below code. When I select image 1 or 2, I want that value to be sent to next page (submit form page). As for now only Image3 is always sent to the next page.</p>
  <pre><code>&lt;form method=&quot;get&quot; action=&quot;order.php&quot;&gt; 
        &lt;div class=&quot;col-lg-8&quot;&gt;
          &lt;div class=&quot;portfolio-details-slider swiper&quot;&gt;
            &lt;div class=&quot;swiper-wrapper align-items-center&quot;&gt;
  
              &lt;div class=&quot;swiper-slide&quot;&gt;
                &lt;input type=&quot;submit&quot; value='&lt;?php $var = &quot;Image1&quot;;?&gt;' style=&quot;background-image: url('img/portfolio/img4.jpg');&quot;&gt;
              &lt;/div&gt;
  
              &lt;div class=&quot;swiper-slide&quot;&gt;
                &lt;input type=&quot;submit&quot; value='&lt;?php $var = &quot;Image2&quot;;?&gt;' style=&quot;background-image: url('img/portfolio/img7.jpg');&quot;&gt;
              &lt;/div&gt;
  
              &lt;div class=&quot;swiper-slide&quot;&gt;
                &lt;input type=&quot;submit&quot; value='&lt;?php $var = &quot;Scooter3&quot;;?&gt;' style=&quot;background-image: url('img/portfolio/img8.jpg');&quot;&gt;
              &lt;/div&gt;
            &lt;div class=&quot;swiper-pagination&quot;&gt;&lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
       &lt;/div&gt; 
      &lt;input type='hidden' name='var' value='&lt;?php echo &quot;$var&quot;;?&gt;'/&gt;
      &lt;input type='hidden' name='fail' value='&lt;?php echo &quot;$fail&quot;;?&gt;'/&gt;
  &lt;/form&gt;
  </code></pre>
  <p>How can I get the correct image value to be sent to the next page?</p>