Fourth pass at adding key files
This commit is contained in:
23
site/slowtwitch.com/www/tick/login.php
Normal file
23
site/slowtwitch.com/www/tick/login.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?require ("global.php");?>
|
||||
<?php
|
||||
|
||||
if (isset($_POST['username']) && isset($_POST['password']))
|
||||
{
|
||||
$query = "SELECT ID FROM users WHERE username = '"
|
||||
. $_POST['username'] . "' AND password = password('"
|
||||
. $_POST['password'] . "') LIMIT 1";
|
||||
$result = mysql_query($query, $db);
|
||||
if ($result)
|
||||
{
|
||||
if ($r = mysql_fetch_array($result))
|
||||
{
|
||||
setcookie("userID", $r['ID']);
|
||||
header("Location: /tick/events.php");
|
||||
}
|
||||
else { header("Location: /tick/login.html"); }
|
||||
}
|
||||
else { header("Location: /tick/login.html"); }
|
||||
}
|
||||
else { header("Location: /tick/login.html"); }
|
||||
|
||||
?>
|
Reference in New Issue
Block a user