Upload files to "old_progress"
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if(isset($_POST['login'])){
|
||||
|
||||
session_start();
|
||||
include('mysql_config.php');
|
||||
|
||||
$uemail=$_POST['uemail']; //TODO - osetrit
|
||||
$upass=$_POST['upass'];
|
||||
$urem=$_POST['urem'];
|
||||
|
||||
echo "<hr><b>POST</b><br>uemail: " . $uemail . "<br>upass: " . $upass . "<br>urem: " . $urem . "<hr>";
|
||||
|
||||
//$query=mysqli_query($mysqli,"select * from `users` where username='$username' && password='$password'");
|
||||
|
||||
$stmt = mysqli_prepare($mysqli, "SELECT `user-id`, `email`, `heslo` FROM users WHERE email = ?");
|
||||
mysqli_stmt_bind_param($stmt, "s", $uemail);
|
||||
mysqli_stmt_execute($stmt);
|
||||
$row = mysqli_stmt_fetch($stmt);
|
||||
mysqli_stmt_bind_result($stmt, $muserid, $memail, $mheslo);
|
||||
|
||||
echo "<hr><b>MYSQL</b><br>muserid: " . $muserid . "<br>memail: " . $memail . "<br>mheslo: " . $mheslo . "<hr>";
|
||||
/*
|
||||
if (mysqli_num_rows($query) == 0){
|
||||
$_SESSION['message']="Login Failed. User not Found!";
|
||||
header('location:login.php');
|
||||
}
|
||||
else{
|
||||
$row=mysqli_fetch_array($query);
|
||||
|
||||
if (isset($_POST['remember'])){
|
||||
//set up cookie
|
||||
setcookie("user", $row['username'], time() + (86400 * 30));
|
||||
setcookie("pass", $row['password'], time() + (86400 * 30));
|
||||
}
|
||||
|
||||
$_SESSION['id']=$row['userid'];
|
||||
header('location:success.php');
|
||||
}
|
||||
*/
|
||||
}
|
||||
else{
|
||||
header('location:login.php');
|
||||
$_SESSION['message']="Please Login!";
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user