My First Web application .. a real shitty one
My First Web application .. a real shitty one
This commit is contained in:
1 parent
610af7dff3
commit
34753111ed
106 files changed
+41611
No files matched your search
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once("../models/user.php");
|
||||
if(isset($_POST['login']))
|
||||
{
|
||||
$pass=$_POST['pass'];
|
||||
$username=$_POST['username'];
|
||||
|
||||
if(empty($username)||empty($pass))
|
||||
{
|
||||
$error = "Please Enter both Username and Password!";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(user::validate($username,$pass)==true)
|
||||
{
|
||||
$myuser= new User($username);
|
||||
$_SESSION["user"] =$myuser->get_values();
|
||||
var_dump($_SESSION["user"]);
|
||||
header("Location: ../views/profilePage.php?username=".$username);
|
||||
}
|
||||
else
|
||||
{
|
||||
$error="Incorrect Username or Password!";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = "Press 'Login' to enter.";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in new issue
Block a user