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
53354f6c
Commit
53354f6c
authored
Mar 16, 2019
by
wutthichai sritonwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
16/3/62
parent
ece08ff5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
11 deletions
+91
-11
Category.blade.php
resources/views/Category.blade.php
+1
-1
Create.blade.php
resources/views/Create.blade.php
+37
-8
Home.blade.php
resources/views/Home.blade.php
+2
-2
Test.blade.php
resources/views/Test.blade.php
+48
-0
web.php
routes/web.php
+3
-0
No files found.
resources/views/Category.blade.php
View file @
53354f6c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<link
href=
"{{ asset('css/resume.min.css') }}"
rel=
"stylesheet"
>
<link
href=
"{{ asset('css/resume.min.css') }}"
rel=
"stylesheet"
>
<style>
<style>
.bg
{
.bg
{
background-image
:
url("img/conn.jpg")
;
/* background-image: url("img/conn.jpg"); */
}
}
.bt
{
.bt
{
...
...
resources/views/Create.blade.php
View file @
53354f6c
...
@@ -79,10 +79,10 @@
...
@@ -79,10 +79,10 @@
<div
class=
"w-100"
>
<div
class=
"w-100"
>
<form>
<form>
<fieldset>
<fieldset>
<legend>
ตั้งกระทู้
</legend
>
<center><legend>
ตั้งกระทู้
</legend></center
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"exampleSelect1"
>
เลือกหมวดหมู่
</label>
<label
for=
"exampleSelect1"
>
เลือกหมวดหมู่
</label>
<select
class=
"form-control"
id=
"menu"
>
<select
class=
"form-control"
id=
"menu"
name=
"menu"
>
<option>
กีฬา
</option>
<option>
กีฬา
</option>
<option>
การ์ตูน
</option>
<option>
การ์ตูน
</option>
<option>
ความรัก
</option>
<option>
ความรัก
</option>
...
@@ -95,13 +95,13 @@
...
@@ -95,13 +95,13 @@
</select>
</select>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"exampleTextarea"
>
หัวข้อกระทู้
</label>
<label
for=
"exampleTextarea"
>
หัวข้อกระทู้
</label>
(ความยาวไม่เกิน 200 ตัวอักษร)
<textarea
class=
"form-control"
id=
"exampleTextarea"
rows=
"1"
></textarea>
<textarea
class=
"form-control"
id=
"exampleTextarea"
rows=
"1"
name=
"head"
></textarea>
<label
for=
"exampleTextarea"
>
ข้อความ
</label>
<label
for=
"exampleTextarea"
>
ข้อความ
</label>
(ความยาวไม่เกิน 10,000 ตัวอักษร)
<textarea
class=
"form-control"
id=
"exampleTextarea"
rows=
"1
0
"
></textarea>
<textarea
class=
"form-control"
id=
"exampleTextarea"
rows=
"1
5"
name=
"manager
"
></textarea>
</div>
</div>
<div
class=
"col-5"
>
<div
class=
"col-5"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
<button
type=
"submit"
name=
"submit"
class=
"btn btn-primary"
>
Submit
</button>
</div>
</div>
</fieldset>
</fieldset>
</form>
</form>
...
@@ -109,12 +109,41 @@
...
@@ -109,12 +109,41 @@
</div>
</div>
</section>
</section>
</div>
</div>
<!-- Bootstrap core JavaScript -->
<!-- Bootstrap core JavaScript -->
<script
src=
"{{ asset('vendor/jquery/jquery.min.js') }}"
></script>
<script
src=
"{{ asset('vendor/jquery/jquery.min.js') }}"
></script>
<script
src=
"{{ asset('vendor/bootstrap/js/bootstrap.bundle.min.js') }}"
></script>
<script
src=
"{{ asset('vendor/bootstrap/js/bootstrap.bundle.min.js') }}"
></script>
<script
src=
"{{ asset('vendor/jquery-easing/jquery.easing.min.js') }}"
></script>
<script
src=
"{{ asset('vendor/jquery-easing/jquery.easing.min.js') }}"
></script>
<script
src=
"{{ asset('js/resume.min.js') }}"
></script>
<script
src=
"{{ asset('js/resume.min.js') }}"
></script>
<!-- Database -->
<?php
$servername
=
"localhost"
;
$username
=
"dbAdmin"
;
$password
=
"P@ss1234"
;
$dbname
=
"projectweb"
;
$conn
=
new
mysqli
(
$servername
,
$username
,
$password
,
$dbname
);
if
(
$conn
->
connect_error
)
{
die
(
"Connection failed: "
.
$conn
->
connect_error
);
}
else
{
if
(
isset
(
$_GET
[
'submit'
]))
{
$U_ME
=
$_GET
[
'menu'
];
$U_H
=
$_GET
[
'head'
];
$U_M
=
$_GET
[
'manager'
];
$subjectName
=
$_POST
[
"subject_names"
];
$sql
=
"INSERT INTO `creatroytip` (`Menus`, `Heats`, `Manager`)
VALUES ('
$U_ME
','
$U_H
','
$U_M
')"
;
if
(
$conn
->
query
(
$sql
)
===
true
)
{
echo
"New record created successfully"
;
}
else
{
echo
"Error: "
.
$sql
.
"<br>"
.
$conn
->
error
;
}
$conn
->
close
();
}
else
{
// echo 'กรุณากรอกข้อมูล';
}
}
?>
</body>
</body>
...
...
resources/views/Home.blade.php
View file @
53354f6c
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<link
href=
"{{ asset('css/resume.min.css') }}"
rel=
"stylesheet"
>
<link
href=
"{{ asset('css/resume.min.css') }}"
rel=
"stylesheet"
>
<style>
<style>
.bg
{
.bg
{
background-image
:
url("img/conn.jpg")
;
/* background-image: url("img/conn.jpg"); */
}
}
.bt
{
.bt
{
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
<a
class=
"nav-link js-scroll-trigger"
href=
"/LG"
>
เข้าสู่ระบบ
</a>
<a
class=
"nav-link js-scroll-trigger"
href=
"/LG"
>
เข้าสู่ระบบ
</a>
</li>
</li>
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link js-scroll-trigger"
href=
"/
r
egister"
>
สมัครสมาชิก
</a>
<a
class=
"nav-link js-scroll-trigger"
href=
"/
R
egister"
>
สมัครสมาชิก
</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
...
resources/views/Test.blade.php
0 → 100644
View file @
53354f6c
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<title>
Document
</title>
</head>
<body>
<form
action=
'#'
method=
'POST'
>
<select
name=
"myselectbox"
>
<option
name=
"myoption1"
value=
"myoption1"
>
myoption1
</option>
<option
name=
"myoption2"
value=
"myoption2"
>
myoption2
</option>
<option
name=
"myoption3"
value=
"myoption3"
>
myoption3
</option>
<option
name=
"myoption4"
value=
"myoption4"
>
myoption4
</option>
</select>
<input
type=
'submit'
name=
'submit'
/>
SSSSSS
</form>
<?php
$servername
=
"localhost"
;
$username
=
"dbAdmin"
;
$password
=
"P@ss1234"
;
$dbname
=
"projectweb"
;
$conn
=
new
mysqli
(
$servername
,
$username
,
$password
,
$dbname
);
if
(
$conn
->
connect_error
)
{
die
(
"Connection failed: "
.
$conn
->
connect_error
);
}
else
{
if
(
isset
(
$_POST
[
'submit'
]))
{
$sql
=
"INSERT INTO test ('Entries') VALUES ('
$_POST[myselectbox]
')"
;
if
(
$conn
->
query
(
$sql
)
===
true
)
{
echo
"New record created successfully"
;
}
else
{
echo
"Error: "
.
$sql
.
"<br>"
.
$conn
->
error
;
}
$conn
->
close
();
}
else
{
// echo 'กรุณากรอกข้อมูล';
}
}
?>
</body>
</html>
\ No newline at end of file
routes/web.php
View file @
53354f6c
...
@@ -14,6 +14,9 @@
...
@@ -14,6 +14,9 @@
Route
::
get
(
'/'
,
function
()
{
Route
::
get
(
'/'
,
function
()
{
return
view
(
'Home'
);
return
view
(
'Home'
);
});
});
Route
::
get
(
'/TT'
,
function
()
{
return
view
(
'Test'
);
});
Route
::
get
(
'/Register'
,
function
()
{
Route
::
get
(
'/Register'
,
function
()
{
return
view
(
'Register'
);
return
view
(
'Register'
);
...
...
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