Unable to save aside username for my database
<p>I will try to explain my problem.</p>

<p>That's how I'm going to build a "Forgot password" feature. where mit system takes up a password so the password is stored in a variable to use in my controller that calls my handler (database) to ask if usernamens password and later ... send an email with your password.</p>

<p>My problem: is that when I do a var_dump of the controller on my "username", so I just get up defult value says it is null. can anyone see if I do something wrong in my code here. because no username is stored</p>

<p>varibale name in the input is set to $ this-user and later do a feature post. but it does not seem like it takes up.</p>

<p>I also have problem with my function TriedtoSendPassword () It is not called properly.</p>

<p>view: </p>

<pre><code> &lt;?php
require_once ("navigationview.php");
class ForgotPasswordView{

private $users = "users";

    public function View(){
        $NavigationView = new NavigationView();
        return '&lt;p&gt;&amp;nbsp;&lt;/p&gt;
            &lt;div id="content"&gt;

                  &lt;h1&gt;Forgot Password?&lt;/h1&gt;
                 &lt;form id="form1" name="form1" action="' . $NavigationView -&gt; GetForgetPasswordIndex() . '"  method="post"&gt;
                    &lt;p&gt;
                      &lt;label for="username"&gt;Write your username: &lt;/label&gt;
                      &lt;input type="text" size="30" name="$this-&gt;users" id="name" class="text" value="" /&gt;

                    &lt;/p&gt;
                            &lt;input type="submit" name="'. NavigationView::ForgetPasswordindex . '" id="submit" value="Skicka"/&gt;
                    &lt;/form&gt;
            &lt;/div&gt;';
    }
public function GetUserName() {
    var_dump($this -&gt; users);
    if (isset($_POST[$this -&gt; users])) {
        return $_POST[$this -&gt; users];
    }
    return FALSE;
}
public function TriedToSendPassword() {
    if (isset($_POST["submit"])) {
        return True;
    }
    return FALSE;
}


     }
</code></pre>

<p>controller:</p>

<pre><code> &lt;?php
  require_once ("View/ForgotPasswordView.php");
  require_once ("View/EmailView.php");
  require_once ("Handler/UserHandler.php");
    class ForgotPasswordController {
public function DoControll() {
    var_dump("här");
    $Stringer = "";
    $ForgotPasswordView = new ForgotPasswordView();
    $EmailView = new EmailView();
    $UserHandler = new UserHandler();
    $Stringer = $ForgotPasswordView-&gt;View();
    $hej = $ForgotPasswordView-&gt;TriedToSendPassword();
    var_dump($hej);
    if($ForgotPasswordView-&gt;TriedToSendPassword() == false){
        var_dump("där");
        $Password = $UserHandler-&gt;GetPassword($ForgotPasswordView-&gt;GetUserName());
        var_dump($Password);
        $EmailView-&gt;Email($Password,$Username);

    }
    return $Stringer;

  }
  }
</code></pre>
