title: Variable in Joomla Module
body: <p>I am busting my head to the wall .... I am making a simple joomla module, in helper.php I cant assign values posted from the form. </p>
  
  <pre><code>&lt;?php
  
  // no direct access
  defined('_JEXEC') or die('Restricted access');
  
  class modReservationHelper {
      public $name;
      public $email;
      public $message;
      public $comment;
  
      protected function  __construct() {
          $this-&gt;name = $_POST['fullname'];
          $this-&gt;email = $_POST['email'];
          $this-&gt;message = $_POST['message'];
          $this-&gt;comment = $_POST['comment'];
      }
  
       function validateForm() {
          echo $this-&gt;name;   //The output is always 0
          echo $this-&gt;email+"&lt;/br&gt;";//The output is always 0
          echo $this-&gt;message;//The output is always 0
  
  
          //When I try
          echo $_POST['comment']; // Is correct
          }   
      }
  
  ?&gt;
  </code></pre>
  
  <p>Also I've tried not to use constructor with the same Zero effect:(</p>
  
  <pre><code>&lt;?php
  
  // no direct access
  defined('_JEXEC') or die('Restricted access');
  
  class modReservationHelper {
      public $name;
      public $email;
      public $message;
      public $comment;
  
  
      function  getValues() {
          $this-&gt;name = $_POST['fullname'];
          $this-&gt;email = $_POST['email'];
          $this-&gt;message = $_POST['message'];
          $this-&gt;comment = $_POST['comment'];
      }
  
       function validateForm() {
          modReservationHelper::getValues;
          echo $this-&gt;name;   //The output is always 0
          echo $this-&gt;email+"&lt;/br&gt;";//The output is always 0
          echo $this-&gt;message;//The output is always 0
  
          //When I try
          echo $_POST['comment']; // Is correct
          }   
      }
  
  ?&gt;
  </code></pre>
  
  <p>The whole procedure is called from "mod_wreservation.php" I call modReservationHelper::validateForm();</p>