title: Passing value from one php page to another using TPL files
body: <p>So this is the situation, which is related to a foolish captcha system I have set up. </p>
  
  <p>register.php, register.tpl, writer.php</p>
  
  <p>register.tpl creates the form</p>
  
  <p>register.php processes the form, but also initially creates a random number that the form, in register.tpl picks up as a variable i.e. {vcode}.</p>
  
  <p>That random number is used in the following context:</p>
  
  <pre><code>&lt;img src="/system/writer.php?R=0&amp;amp;T={vcode}" /&gt;
  &lt;input type="hidden" name="syscode" value="{vcode}" /&gt;
  &lt;strong&gt;Enter Code:&lt;/strong&gt;
  &lt;input name="code" type="text" id="code" /&gt;
  </code></pre>
  
  <p>writer.php captures the value of vcode and creates an image. </p>
  
  <p>Problem: </p>
  
  <p>a. vcode can be read by bots and therefore this captcha is useless.</p>
  
  <p>b. register.php asks if syscode != code but again syscode is a useless field cause bots can read it. </p>
  
  <p>c. I've taken the process in register.php that generates a random number and placed it in writer.php but I can't get the value of the random variable that's created into register.php to make the comparison, as in:</p>
  
  <p>In writer.php I have $randno = and(1,999999); and that value is displayed as an image - I know you all know that, but now I need register.php to read $randno or get the value so it can make the comparison as in:</p>
  
  <p>if $code = $randno { stuff }</p>
  
  <p>The basic problem is creating a trustworthy captcha using TPL files...it's not that easy.</p>
  
  <p>Every, I thank you for your assistance and for trying to help me. </p>