title: I need to change my submit button class
body: <p>I need to change form left to right layout and right to left when i press the button here is my code : </p>
  
  <pre><code>&lt;form method="post"&gt;
  &lt;ul&gt;
   &lt;li class="left"&gt;
      &lt;input name="left" type="submit" class="left" value="left"&gt;
   &lt;/li&gt;
   &lt;li class="right"&gt;
    &lt;input name="right" type="submit" class="right" value="right"&gt;
   &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>now I need to add an if statement like : </p>
  
  <pre><code>if(isset($_POST['left'])) {
  echo '    &lt;ul&gt;
   &lt;li class="left"&gt;
      &lt;input name="left" type="submit" class="left" value="left"&gt;
   &lt;/li&gt;
   &lt;li class="right"&gt;
    &lt;input name="right" type="submit" class="right" value="right"&gt;
   &lt;/li&gt;
   &lt;/ul&gt;';
  }
  if(isset($_POST['right'])){
  {
  echo '    &lt;ul&gt;
   &lt;li class="left"&gt;
      &lt;input name="left" type="submit" class="right" value="left"&gt;
   &lt;/li&gt;
   &lt;li class="right"&gt;
    &lt;input name="right" type="submit" class="left" value="right"&gt;
   &lt;/li&gt;
   &lt;/ul&gt;';
  }
  </code></pre>