<!DOCTYPE html>
ASK
Copyrights@ ©WWW.Myschool.com
php
<?php
session_start();
error_log("chk.php executing");
// Get values from form
include 'config.php';
foreach ($_POST as $key => $value) {
error_log($key);
}
//error_log($_POST['username']);
$username=$_POST['username'];
$password=$_POST['password'];
// Insert data into mysql
$qry = mysql_query("SELECT * FROM useraccount WHERE username='$username'");
if(!$qry) {
die("Query Failed: ". mysql_error());
} else {
$row=mysql_fetch_array($qry);
if ($username==$row['username']) {
if($username=='' || $password=='') {
error_log("some fields are empty");
//header("Location:login.php?id=Some fields are empty");
// header("Content-Type: text/html");
// {echo "Some fields are empty";}
} else if($username==$row['username'] && $password==$row['password']) {
$_SESSION['username'] = $username;
error_log("logged in");
header('Location: home.php');
// header("Content-Type: text/html");
// {echo "User name password verified";}
//header("Location: home.html?id=$username");
} else {
error_log("password is incorrect");
// header("Content-Type: text/html");
// {echo "username already taken or your password is incorrect. Please try again";}
//header("Location:.php?id=username already taken or your password is incorrect. Please try again");
}}
else
error_log("username incorrect");
}
mysql_close();
?>
css
html,body
{
margin:0px;
height:100%;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
width: 60%;
margin: auto;
}
.content
{
width:100%;
height:300px;
padding:30px;
margin:15px;
}
.about
{
width:100%;
height:200px;
padding:10px 10px;
}
.vimi
{
width:100%;
height:200px;
}
.vision
{
width:50%;
height:200px;
padding:10px;
float:left;
}
.mission
{
width:50%;
height:200px;
padding:10px;
float:left;
}
.english
{
width:80%;
height:250px;
padding:10px;
float:left;
}
.eimg
{
width:20%;
height:250px;
float:left;
}
.signup
{
height:500px;
}
.footer
{
position:relative;
background-color:black;
width:100%;
height:45px;
}
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
in this i need to display username who is signing up