title: how to concatenate two column value before inserting in table n store same same table at same time
body: <p>I want to concatenate two Textbox values and store the same table in different name, while inserting a query</p>
  
  <p>for Example</p>
  
  <pre><code>$Standard= $_POST['Standard'];
  $division = $_POST['division'];
  $RollNo = $_POST['RollNo'];
  $Year = $_POST['Year'];
  $Class_ID = $Standard.$division.$Year;
  $Student_ID = $Class_ID.$RollNo;
  
  &lt;form action="#" method="POST"&gt;
  
              &lt;label&gt;Standard&lt;/label&gt; 
              &lt;input type="text" name="Standard"&gt; 
  
              &lt;label&gt;division&lt;/label&gt; 
              &lt;input type="text" name="division"&gt; 
  
              &lt;label&gt;Roll No&lt;/label&gt; 
              &lt;input type="text" name="RollNo"&gt; 
              &lt;label&gt;Year&lt;/label&gt; 
              &lt;?php
              $already_selected_value = 1984;
              $earliest_year = 1990;
              print '&lt;select name="Year"&gt;';
              foreach (range(date('Y'), $earliest_year) as $x) {
              print '&lt;option value="'.$x.'"'.($x === $already_selected_value ? ' selected="selected"' : '').'&gt;'.$x.'&lt;/option&gt;';
                  }
                  print '&lt;/select&gt;';
              ?&gt;
          &lt;/div&gt; 
              &lt;button type="submit" class="btn btn-default w3ls-button" name="button"&gt;Submit&lt;/button&gt; 
      &lt;/form&gt; 
  </code></pre>
  
  <p>Here I have the <code>Textbox</code> for standard, division, <code>RollNo</code> and <code>Year</code> and I created a variable for taking data from text box. But here I also created two extra variables <code>$Class_ID</code>, <code>$Student_ID</code> in class_Id and I want to concatenate <code>$Standard+$division+$Year</code> and in <code>$Student_ID = $Class_ID+$RollNO</code> then after I want insert all value in table:</p>
  
  <pre><code>$sql = "INSERT INTO `class`(Student_ID, Class_ID, Standard, division, RollNo, Year) VALUES ('$Student_ID','$Class_ID','$Standard','$division','$RollNo','$Year')";
  </code></pre>