webserver/htdocs/singlefilelogin.php
/**
     * Simple demo-"page" with the login form.
     * In a real application you would probably include an html-template here, but for this extremely simple
     * demo the "echo" statements are totally okay.
     */
Simple demo-"page" with the login form.
In a real application you would probably include an html-template here, but for this extremely simple
demo the "echo" statements are totally okay.
Simple demo - " page " with the login form . In a real application you would probably include an html - template here but for this extremely simple demo the " echo " statements are totally okay .
private function showPageLoginForm()
    {
        if ($this->feedback) {
            echo $this->feedback . "<br/><br/>";
        }
        echo '<h2>Login</h2>';
        echo '<form method="post" action="' . $_SERVER['SCRIPT_NAME'] . '" name="loginform">';
        echo '<label for="login_input_username">Username (or email)</label> ';
        echo '<input id="login_input_username" type="text" name="user_name" required /> ';
        echo '<label for="login_input_password">Password</label> ';
        echo '<input id="login_input_password" type="password" name="user_password" required /> ';
        echo '<input type="submit"  name="login" value="Log in" />';
        echo '</form>';
    }
private function showPageLoginForm ( ) { if ( $ this -> feedback ) { echo $ this -> feedback . " <br/><br/> " ; } echo '<h2>Login</h2>' ; echo '<form method="post" action="' . $ _SERVER [ 'SCRIPT_NAME' ] . '" name="loginform">' ; echo '<label for="login_input_username">Username (or email)</label> ' ; echo '<input id="login_input_username" type="text" name="user_name" required /> ' ; echo '<label for="login_input_password">Password</label> ' ; echo '<input id="login_input_password" type="password" name="user_password" required /> ' ; echo '<input type="submit"  name="login" value="Log in" />' ; echo '</form>' ; }
Simple demo-"page" with the login form.
Simple demo - " page " with the login form .
// mvh 20201021 blocked out //echo '<a href="' . $_SERVER['SCRIPT_NAME'] . '?action=register">Register new account</a>';