<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Create User Test!</title> </head> <body> <h1> New User Test </h1> <?php $username = $HTTP_POST_VARS['username']; $password = $HTTP_POST_VARS['password']; $email = $HTTP_POST_VARS['email']; if (isset($_POST['submit'])) { if (check_user_error($username, $password, $email, true)) { user_add($username, $password, $email); } } ?> <form action="test_create_user.php" method="post"> <fieldset> <legend>New User</legend> <p> <label for="username">Username</label> <br / > <input type="text" name="username" / > </p> <p> <label for="email">Email</label> <br / >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Create User Test!</title> </head> <body> <h1> Login Test </h1> <?php $username = $HTTP_POST_VARS['username']; $password = $HTTP_POST_VARS['password']; $user = get_user_from_name($username); if (isset($_POST['submit'])) { if (check_user_error($username, $password, "empty", false)) { $session_id = session_id(); $_SESSION['user'] = $user; } } ?> <form action="test_login.php" method="post"> <fieldset> <legend>Login</legend> <p> <label for="username">Username</label> <br / > <input type="text" name="username" / > </p> <p> <label for="password">Password</label>