title: How to access value of a label in php?
body: <p>I am trying to create a math question set for a website where the user will be given an equation and they have to write the answer in the form.</p>
  
  <p>My HTML mark up looks like this</p>
  
  <pre><code>    &lt;p&gt; Please write the sum of these two numbers &lt;/p&gt;
      &lt;label for="num1"&gt;Number1: &lt;?php echo rand(2,200)?&gt; 
      &lt;label for="num2"&gt;Number2: &lt;?php echo rand(2,200)?&gt; 
      &lt;input name="sum" type="text" /&gt;
  </code></pre>
  
  <p>I want to be able to check if the entered the right sum of the two values that are generated. This is just generic at the point. It will eventually end up having more variables and different math operators for the question</p>
  
  <p>How do I do the following with PHP server side script:</p>
  
  <p>a) The value that the Label's have from echo rand() function and 
  b) how do I get the code to store them as variables and output to the screen?</p>
  
  <p>PS: I have to do it on php side and I am aware this might be do-able with Javascript/Jquery.</p>
  
  <p>Thank you in advance for your help.</p>
  
  <p>Varun</p>