title: what if register_global is enabled
body: <p>I've simple captcha that works perfect when register_global is disabled and this is the correct according to PHP Manual <a href="http://php.net/manual/en/security.globals.php" rel="nofollow">Using Register Globals</a></p>
  
  <p>But sometimes i moves to many hosting and they by default enabled register global so my captcha stop working and always gives wrong captcha even if it was entered correct.</p>
  
  <p><strong>My question</strong></p>
  
  <p>why it does not works if register_global is enabled as well as if disabled ?</p>
  
  <p><strong>The code</strong></p>
  
  <p>captcha.php</p>
  
  <pre><code>&lt;?PHP
  session_start();
  $digits_num=5;
  $x_pos=25;
  $y_pos=6;
  $font_size=5;
  function random_num($n){
  $start_num = "1".str_repeat("0", $n-1);;
  $end_num   = str_repeat("9", $n);
  return rand($start_num, $end_num);
  }
  $text = random_num($digits_num);
  $_SESSION["captcha_num"] = md5($text);
  $captcha = imagecreatefrompng("./images/captcha.png");
  $font_color['black']=imagecolorallocate($captcha, 0, 0, 0);
  $font_color['white']=imagecolorallocate($captcha, 80, 73, 20);
  imagestring($captcha, $font_size, $x_pos, $y_pos, $text, $font_color['white']);
  header("Content-type: image/png");
  imagepng($captcha);
  ?&gt;
  </code></pre>
  
  <p>The form</p>
  
  <pre><code>&lt;form name="frm" method="post" action="add.php"&gt;
  &lt;img src="captcha.php"&gt;
  &lt;input type="text" name="captcha_num" id="captcha_num" &gt;
  &lt;input type="submit" name="submit" id="submit" value="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>add.php</p>
  
  <pre><code>&lt;?PHP
  session_start();
  if(md5($_POST['captcha_num']) != $_SESSION['captcha_num']){
  echo "Wrong captcha";
  }else{
  echo "Good Pass it";
  }
  ?&gt;
  </code></pre>