<commit_before><?php
	session_start();
	if(!isset($_SESSION['username'])){
			if(isset($_POST['username']) && isset($_POST['password'])){
			$username = $_POST['username'];
			$password = $_POST['password'];
		
			if($username != null && $password != null){
				$db_source = "";
				$db_user = "";
				$db_passwd = "";
				$db_use = "";
				
				$db = mysqli_connect($db_source, $db_user, $db_passwd, $db_use) or die(mysqli_error());
				
				$q = "select * from users where username='$username'";
				$results = mysqli_query($db, $q) or die(mysqli_error($db));
				
				if(mysqli_num_rows($results) == 1){
					$row = mysqli_fetch_array($results);
					$hashed_password = $row['password'];

					if(password_verify($password, $hashed_password)){
						session_start();
						$_SESSION['username'] = $username;
						header("Location:/");
						exit();
					}
					else{
						header("Location:/?login=1");
						exit();
					}
				}<commit_msg>Minor indenting issue<commit_after><?php
	session_start();
	if(!isset($_SESSION['username'])){
		if(isset($_POST['username']) && isset($_POST['password'])){
			$username = $_POST['username'];
			$password = $_POST['password'];
	
			if($username != null && $password != null){
				$db_source = "";
				$db_user = "";
				$db_passwd = "";
				$db_use = "";
				
				$db = mysqli_connect($db_source, $db_user, $db_passwd, $db_use) or die(mysqli_error());
				
				$q = "select * from users where username='$username'";
				$results = mysqli_query($db, $q) or die(mysqli_error($db));
				
				if(mysqli_num_rows($results) == 1){
					$row = mysqli_fetch_array($results);
					$hashed_password = $row['password'];

					if(password_verify($password, $hashed_password)){
						session_start();
						$_SESSION['username'] = $username;
						header("Location:/");
						exit();
					}
					else{
						header("Location:/?login=1");
						exit();
					}
				}
{'fraction_non_alphanumeric': 0.20147679324894516, 'fraction_numerical': 0.002109704641350211, 'mean_word_length': 3.4635294117647057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6848460', 'n_tokens_mistral': 847, 'n_tokens_neox': 631, 'n_words': 104}