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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
<? /* * Script Name: PHP Webboard * Version : 1.0 * License : Free * Date : 24/02/2018 * Web URI: http://phpscrip.com * Begin SourceCode : Thaicreate.com * Modify By : newaiman * Last Modify : 24/02/2018 */ $objConnect = mysql_connect("localhost","db_user","db_password") or die("Error Connect to Database"); $objDB = mysql_select_db("db_name");
if($_GET["Action"] == "Save") { //*** Insert Question ***// $strSQL = "INSERT INTO webboard "; $strSQL .="(CreateDate,Question,Details,Name) "; $strSQL .="VALUES "; $strSQL .="('".date("Y-m-d H:i:s")."','".$_POST["txtQuestion"]."','".$_POST["txtDetails"]."','".$_POST["txtName"]."') "; $objQuery = mysql_query($strSQL); header("location:index.php"); } ?> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>NewQuestion : PhpScrip.Com</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="description" content="แจกสคริป Webboard Php ใช้งานง่าย ไม่ยุ่งยาก" /> <meta name="keywords" content="สคริปเว็บบอร์ด php, php webboard, free php board" /> <meta name="googlebot" content="index,follow"/> <meta http-equiv="Content-Language" CONTENT="TH-TH"> <script src='https://www.google.com/recaptcha/api.js?hl=th'></script> <style type="text/css"> <!-- a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } --> </style></head> <body>
<p><br> <a href="index.php">กลับไปยังหน้าบอร์ด</a></p> <form action="NewQuestion.php?Action=Save" method="post" name="frmMain" id="frmMain"> <table width="621" border="1" cellpadding="1" cellspacing="1"> <tr> <td bgcolor="#E6FFE6"><div align="center">หัวข้อ</div></td> <td><input name="txtQuestion" type="text" id="txtQuestion" value="" size="70"></td> </tr> <tr> <td width="84" bgcolor="#FFFFD5"><div align="center">รายละเอียด</div></td> <td><textarea name="txtDetails" cols="70" rows="6" id="txtDetails"></textarea></td> </tr> <tr> <td width="84" bgcolor="#EAFFFF"><div align="center">ชื่อ</div></td> <td width="524"><input name="txtName" type="text" id="txtName" value="" size="50"></td> </tr> </table>
<p> <input name="btnSave" type="submit" id="btnSave" value="โพสท์"> </p> </form> </body> </html> <? mysql_close($objConnect); ?>
|