Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
ProjectWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ProjectWeb
ProjectWeb
Commits
b18325cf
Commit
b18325cf
authored
Mar 15, 2019
by
wutthichai sritonwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
16/03/62
parent
a293191f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
26 deletions
+41
-26
Home.blade.php
resources/views/Home.blade.php
+1
-1
Register.php
resources/views/Register.php
+15
-11
Test.php
resources/views/Test.php
+3
-2
login.php
resources/views/login.php
+21
-11
web.php
routes/web.php
+1
-1
No files found.
resources/views/Home.blade.php
View file @
b18325cf
...
...
@@ -33,7 +33,7 @@
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<ul
class=
"navbar-nav"
id=
"accordion"
class=
"accordion"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link js-scroll-trigger"
href=
"login/"
>
เข้าสู่ระบบ
</a>
<a
class=
"nav-link js-scroll-trigger"
href=
"
register/
login/"
>
เข้าสู่ระบบ
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link js-scroll-trigger"
href=
"register/"
>
สมัครสมาชิก
</a>
...
...
resources/views/Register.php
View file @
b18325cf
...
...
@@ -75,7 +75,7 @@
</head>
<body>
<div
class=
"container-fluid"
>
<form
action=
"
"
method=
"
"
class=
"register-form"
>
<form
action=
"
#"
method=
"get
"
class=
"register-form"
>
<div
class=
"row"
>
<div
class=
"col-md-4 col-sm-4 col-lg-4"
>
<label
for=
"firstName"
>
Username
</label>
...
...
@@ -84,26 +84,30 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-4 col-sm-4 col-lg-4"
>
<label
for=
"
email
"
>
Password
</label>
<label
for=
"
password
"
>
Password
</label>
<input
name=
"password"
class=
"form-control"
type=
"password"
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-4 col-sm-4 col-lg-4"
>
<label
for=
"
password
"
>
Nickname
</label>
<label
for=
"
name
"
>
Nickname
</label>
<input
name=
"name"
class=
"form-control"
type=
"text"
>
</div>
</div>
<hr>
<div
class=
"row"
>
<div
class=
"col-md-6 col-sm-6 col-xs-6 col-lg-6"
>
<button
class=
"btn btn-default regbutton"
>
Register
</button>
</div>
<div
class=
"col-md-6 col-sm-6 col-xs-6 col-lg-6"
>
<button
class=
"btn btn-default logbutton"
>
Sign up
</button>
</div>
</div>
<div
class=
"col-md-6 col-sm-6 col-xs-6 col-lg-6"
>
<a
class=
"btn btn-default regbutton"
href=
"/"
>
กลับ
</a>
<!-- <button class="btn btn-default regbutton">กลับ</button> -->
</div>
<div
class=
"col-md-6 col-sm-6 col-xs-6 col-lg-6"
>
<button
class=
"btn btn-default regbutton"
type=
"submit"
name=
"submit"
onclick=
"login"
>
สมัครใช้งาน
</button>
</div>
</div>
<center><div
class=
"col-md"
>
<a
class=
"btn btn-default regbutton"
href=
"login/"
>
Login
</a>
</div></center>
</form>
</div>
<?php
...
...
resources/views/Test.php
View file @
b18325cf
...
...
@@ -24,4 +24,5 @@
}
mysqli_close
(
$conn
);
?>
\ No newline at end of file
?>
csadasdasd,a;sdlas;'dsdl;fkas;ldfka's;ldkfa;lskdf'l;askdf;'laskdf;'lkasdl;'fkas;ldfkas;'ldkfa;'lsdkf';asd'
\ No newline at end of file
resources/views/login.php
View file @
b18325cf
...
...
@@ -5,7 +5,7 @@
<!-- <link rel="stylesheet" href="style.css"> -->
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"
></script>
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.2/css/all.css"
>
<style>
<
!-- <
style>
*{
font-family: "montserrat",sans-serif;
}
...
...
@@ -52,15 +52,15 @@
border-radius: 6px;
cursor: pointer;
}
</style>
</style>
-->
</head>
<body>
<div
class=
"login-box"
>
<form
class=
"login-form"
action=
"#"
method=
"get"
>
<h1>
Welcome
</h1>
<input
class=
"txtb"
type=
"text"
name=
"U
SER
"
placeholder=
"Username"
>
<input
class=
"txtb"
type=
"password"
name=
"
PASS
"
placeholder=
"Password"
>
<input
class=
"login-btn"
type=
"submit"
name=
"submit"
value=
"
Login
"
>
<input
class=
"txtb"
type=
"text"
name=
"U
sername
"
placeholder=
"Username"
>
<input
class=
"txtb"
type=
"password"
name=
"
password
"
placeholder=
"Password"
>
<input
class=
"login-btn"
type=
"submit"
name=
"submit"
value=
"
submit
"
>
<p></p>
</form>
</div>
...
...
@@ -72,18 +72,28 @@
$conn
=
mysqli_connect
(
$servername
,
$username
,
$password
,
$dbname
);
if
(
isset
(
$_GET
[
'submit'
])){
$users
=
$_GET
[
'USER'
];
$Passs
=
$_GET
[
'PASS'
];
$users
=
$_GET
[
'Username'
];
$Passs
=
$_GET
[
'password'
];
// echo ($users.$Passs);
$sql
=
"SELECT * FROM `USERS`"
;
$result
=
mysqli_query
(
$conn
,
$sql
);
$a
=
array
();
if
(
mysqli_num_rows
(
$result
)
>
0
)
{
while
(
$row
=
mysqli_fetch_array
(
$result
,
MYSQLI_BOTH
))
{
if
(
$users
==
$row
[
1
]){
echo
'กรุณากรอกข้อมูล1'
;
}
else
if
(
$Passs
==
$row
[
2
]){
echo
'กรุณากรอกข้อมูล2'
;
$a
[
$row
[
1
]]
=
$row
[
2
];
}
if
(
array_key_exists
(
$users
,
$a
)){
if
(
$Passs
==
$a
[
$users
]){
echo
"Welcome "
.
$users
;
}
else
{
echo
"Wrong password"
;
}
}
else
{
echo
"Unknown username "
;
}
}
else
{
echo
"0 results"
;
}}
...
...
routes/web.php
View file @
b18325cf
...
...
@@ -15,7 +15,7 @@ Route::get('/', function () {
return
view
(
'Home'
);
});
Route
::
get
(
'/login'
,
function
()
{
Route
::
get
(
'/
register/
login'
,
function
()
{
return
view
(
'Login'
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment