Just archiving this project from my Open Source Software class.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
$fileName = basename(__FILE__, ".php"); //grabs the file name and drops the extension
|
||||
$fileName = str_replace('-', ' ', $fileName); //replaces all hypens with a space
|
||||
$fileName = ucwords($fileName); //capitalizes the first letter of every word
|
||||
include("templates/signed-header.php")
|
||||
?>
|
||||
<form method="post" action="index.php" name="loginform">
|
||||
<label for="login_input_username">Username</label>
|
||||
<input id="login_input_username" type="text" name="user_name" required />
|
||||
<label for="login_input_password">Password</label>
|
||||
<input id="login_input_password" type="password" name="user_password" required />
|
||||
<input type="submit" name="login" value="Log in" />
|
||||
</form>
|
||||
|
||||
<?php
|
||||
// show negative messages
|
||||
if ($login->errors) {
|
||||
foreach ($login->errors as $error) {
|
||||
echo $error;
|
||||
}
|
||||
}
|
||||
|
||||
// show positive messages
|
||||
if ($login->messages) {
|
||||
foreach ($login->messages as $message) {
|
||||
echo $message;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</body>
|
||||
Reference in New Issue
Block a user