Started on forgot password stuff. fixed a funciton file connection.

This commit is contained in:
Robbie Antenesse 2015-12-08 22:38:53 -08:00
parent dadc4fba86
commit 6868aa5d2b
4 changed files with 12 additions and 29 deletions

10
FORGOT.form Normal file
View File

@ -0,0 +1,10 @@
<div class="settingsCol"><form id="forgotForm" method="post" action="?forgot">
<h2>Forgot Password</h2>
<label><span>Email</span>
<input type="email" id="forgotEmailField" name="email" />
</label>
<div id="forgotError" style="font-weight:bold;color:red;"></div>
<button type="submit" id="forgotSubmitButton" onclick="ValidateLogin(); return false;">Email Password Reset Key</button>
<div id="dictionaryWarn"></div>
<span id="forgotPassword" onclick="ShowInfo('login')">Log In/Create Account</span>
</form></div>

View File

@ -9,6 +9,7 @@
<div id="loginError" style="font-weight:bold;color:red;"></div>
<button type="submit" id="loginSubmitButton" onclick="ValidateLogin(); return false;">Log In</button>
<div id="dictionaryWarn"></div>
<span id="forgotPassword" onclick="ShowInfo('forgot')">Forgot Password?</span>
</form></div>
<div class="settingsCol"><form id="createAccountForm" method="post" action="?createaccount">
<h2>Create a New Account</h2>

View File

@ -10,32 +10,4 @@ define("DATABASE_USERNAME", "username");
define("DATABASE_PASSWORD", "password");
define("DATABASE_NAME", "databasename");
$dbconnection = new PDO('mysql:host=' . DATABASE_SERVERNAME . ';dbname=' . DATABASE_NAME . ';charset=utf8', DATABASE_USERNAME, DATABASE_PASSWORD);
$dbconnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$dbconnection->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$dbconnection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
define("DATABASE_CONNECTION", $dbconnection);
/*function connection() {
// Fill this with relevant data.
$servername = "host";
$username = "username";
$password = "password";
$dbname = "database_name";
$conn = new PDO('mysql:host=' . DATABASE_SERVERNAME . ';dbname=' . DATABASE_NAME . ';charset=utf8', DATABASE_USERNAME, DATABASE_PASSWORD);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
// Create connection
// $conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
// if (!$conn) {
// die("Connection failed: " . mysqli_connect_error());
// }
return $conn;
}*/
?>

View File

@ -4,6 +4,6 @@
require_once(SITE_LOCATION . '/php/helpers.php');
require_once(SITE_LOCATION . '/php/plugins/easycrypt.php');
require_once(SITE_LOCATION . '/php/validation.php');
require_once(SITE_LOCATION . '/php/password_reset_validation.php');
require_once(SITE_LOCATION . '/php/ajax_passwordresetvalidation.php');
?>