Exemple #1
0
	<h3>It's Free and always will be.</h3>
	<!-- firstname -->
	First Name: <input autocomplete="off" type="text"  name="firstname" value="<?php 
echo ForumInput::getForumInput('firstname');
?>
">
	<br/>
	<!-- lastname -->
	Last Name: <input autocomplete="off" type="text" style="margin-left: 5px;" name="lastname" value="<?php 
echo ForumInput::getForumInput('lastname');
?>
">
	<br/>
	<!-- email -->
	Email: <input autocomplete="off" style="margin-left: 45px;" type="text" name="email" value="<?php 
echo ForumInput::getForumInput('email');
?>
">
	<br/>
	<!-- password -->
	Password:
	<input type="password" style="margin-left: 15px;" name="password">
	<br/>
	<!-- gender -->
	Gender:
	<input type="radio"	<?php 
echo "checked";
?>
 name="gender" <?php 
if (isset($gender) && $gender == "female") {
    echo "checked";
Exemple #2
0
<?php

require_once 'php/InitFiles/Init.php';
if (ForumInput::forumExists($POST)) {
    $validateLogin = new ValidateUserInput();
    $passed = $validateLogin->validateForum($_POST, array('email' => array('required' => true), 'password' => array('required' => true)));
    if ($passed->getValidForum()) {
        $user = new UserSession();
        $login = $user->login(ForumInput::getForumInput($EMAIL), ForumInput::getForumInput($PASSWORD));
        if ($login) {
            RedirectPage::to('index.php');
        } else {
            echo "please check your email and password again";
        }
    } else {
        print_r($passed->getErrors());
    }
}
?>
<form action="" method="post">
	<div class="">
		<label for="email">Email</label>
		<input autocomplete="off" type="text" name="email" id="email">
	</div>
	<div class="">
		<label for="password">Password</label>
		<input autocomplete="off" type="password" name="password" id="password">
	</div>
	<input type="submit" value="Log In">
</form>