Commit 53354f6c authored by wutthichai sritonwong's avatar wutthichai sritonwong

16/3/62

parent ece08ff5
...@@ -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 {
......
...@@ -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="10"></textarea> <textarea class="form-control" id="exampleTextarea" rows="15" 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>
......
...@@ -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="/register">สมัครสมาชิก</a> <a class="nav-link js-scroll-trigger" href="/Register">สมัครสมาชิก</a>
</li> </li>
</ul> </ul>
</div> </div>
......
<!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
...@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment