FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
resourceme/login.php at master · StephDen/resourceme · GitHub
StephDen
/
resourceme
Public
Notifications
You must be signed in to change notification settings
Fork
2
Star
5
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
resourceme
/
login.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
43 lines (36 loc) · 1.04 KB
Breadcrumbs
resourceme
/
login.php
Copy path
File metadata and controls
43 lines (36 loc) · 1.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Created by PhpStorm.
* User: Stephen
* Date: 2017-11-25
* Time: 2:36 PM
*/
require_once
(
'
php/dbconnect.php
'
);
require_once
(
'
php/GenerateQuery.php
'
);
$
user
=
htmlspecialchars
(
$
_POST
[
"
username
"
]);
$
pass
=
htmlspecialchars
(
$
_POST
[
"
password
"
]);
if
(GenerateQuery::
Login
(
$
user
,
$
pass
)==
'
true
'
){
setcookie
(
'
username
'
,
$
user
,
time
()+(
86400
*
30
)
);
//time = 30days
header
(
'
Location: profile.php
'
);
}
else
{
//Login failed
$
_COOKIE
[
'
username
'
]=
''
;
header
(
'
Location: index.php
'
);
echo
"
alert('Incorrect Login!');
"
;
}
//Victor Test Code Below
//dbconnect::sql_query('SELECT * FROM test')
//$returntext = dbconnect::sql_query('Select * FROM test');
//echo count($returntext)."<br />";
//echo $returntext['address'];
//test case, works
//GenerateQuery::Create_New_User('Kat','123','ad1354gdfs2f4se3refaefvsfvgafbgsh');
//$array = dbconnect::sql_query('SELECT * FROM test');
//for ($i = 0; $i <= count($array); ++$i) {
// for ($j = 0; $j <= count($array); ++$j) {
// echo $array[$i][$j] . "<br/>";
// }
//}
?>
Back
|
FazBrowse Home
|
New Git URL