return $arr; } //checking if user logged in if (!isset($_SESSION["user"])) { echo "<p>Not logged in</p>"; } else { echo "<p>Logged in</p>"; } //class instance $form = new auto_form($serverlink); //debug queries $form->debug(); //setting callback functions $form->add_custom_validation("valid_captcha", "Incorrect captcha entered"); $form->set_onsuccess("login"); $form->set_modification("hash_pass"); //excluding table columns $ex = array("ID", "firstname", "lastname", "email", "password", "gender"); //providing form language $lang = array("username" => "Username", "password" => "Password", "captcha" => "Enter captcha", "code" => "Captcha code"); $form->set_language($lang); /************************* * Generating form *************************/ echo "<fieldset>"; echo "<legend>Login</legend>"; //adding custom password field $html = "<input type='password' name='password'"; if (isset($_POST["password"])) { $html .= " value='" . $_POST["password"] . "'"; }