mirror of
				https://github.com/Alamantus/Lexiconga.git
				synced 2025-11-04 10:17:01 +01:00 
			
		
		
		
	Started on forgot password stuff. fixed a funciton file connection.
This commit is contained in:
		
							parent
							
								
									dadc4fba86
								
							
						
					
					
						commit
						6868aa5d2b
					
				
					 4 changed files with 12 additions and 29 deletions
				
			
		
							
								
								
									
										10
									
								
								FORGOT.form
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								FORGOT.form
									
										
									
									
									
										Normal 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>
 | 
			
		||||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
}*/
 | 
			
		||||
?>
 | 
			
		||||
| 
						 | 
				
			
			@ -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');
 | 
			
		||||
 | 
			
		||||
?>
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue