Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as PHP by ajinkya ( 7 years ago )
<?php
	session_start();
	echo $_SESSION["username"];
	echo $_SESSION["password"];


	$username = stripcslashes($_SESSION["username"]);
	$password = stripcslashes($_SESSION['password']);

	//$username = mysqli_real_escape_string($username);
	//$password = mysqli_real_escape_string($password);

	$con = mysqli_connect("localhost" , "root" , "", "Login_DB");
	//mysqli_select_db($con,);
	$sql = "select * from Login_Table where Email = '$username' and Pass = '$password'";
	$result = mysqli_query($con,$sql) 
				or die("Failed to create connection.".mysqli_error($con));

				$row = mysqli_fetch_array($result);

	if($row["Email"] != "") 
	{

		echo "Login successfull.. welcome " . $row["Email"];
	}
	else
	{
		echo "Failed";
	}
?>

 

Revise this Paste

Your Name: Code Language: