Thursday, 14 January 2016

Our Goals


  • Best Quality. 

  • Responsive.

  • E-commerce and Corporate Websites.
<?php
include_once("dbconnect.php");
session_start();

if(isset($_POST["submit"]))
{
$username=$_POST["username"];
$password=$_POST["password"];

$sqlstr="SELECT uid,fname FROM users WHERE email='$username' AND password='$password'";
$result=$db->query($sqlstr);

if(!$result)
{
die("Error:".$db->error);
}

if($result->num_rows==1)
{
$output=$result->fetch_array(MYSQL_ASSOC);
$_SESSION["uid"]=$output["uid"];
$_SESSION["fname"]=$output["fname"];

header("location:homepage.php");
}
else
{
echo "<center>"."Username and Password is Incorrect";
}
}

?>

<html>
<head></head>
<body>
<form action="" method="post">
<center>
USERNAME <input type="text" name="username"> <br/> <br/>
PASSWORD <input type="password" name="password"> <br/> <br/>

<input type="submit" name="submit">
</center>
</form>
</body>
</html>