|
 |
|
สอบถามเกี่ยวกับปัญหากับการทำเว็บบอร์ด PHP (หน้าตั้งกระทู้ใหม่ + หน้าแสดงกระทู้และความคิดเห็น) |
|
 |
|
|
 |
 |
|
จากกระทู้นี้
ผมได้สร้างฐานข้อมูล MySQL + insert ข้อมูล + ทำการปรับเปลี่ยนโค้ดให้เป็น mysqli เรียบร้อยแล้ว และได้นำโค้ดไปใช้ใน Web Template ซึ่งเพจ webboard (แสดงเว็บบอร์ด) ไม่มีปัญหาอะไร แต่เกิดปัญหากับเพจ newquestion (ตั้งกระทู้ใหม่) และเพจ viewwebboard (แสดงกระทู้และความคิดเห็น) ดังต่อไปนี้
1) เพจ newquestion เมื่อทำการแสดงผลผ่านบราวเซอร์เสร็จ ผมได้ลองสร้างกระทู้ใหม่ (ภาพที่ 1) และกดปุ่ม "บันทึกข้อมูล" เสร็จ ก็จะแสดงหน้าเพจ (ภาพที่ 2) ปัญหาที่เกิดขึ้นคือ ไม่แสดงกระทู้ใหม่ที่เพิ่มขึ้นมา

(ภาพที่ 1)

(ภาพที่ 2)
ส่วนอันนี้เป็นโค้ดของเพจ newquestion ครับ
Code (PHP)
<!doctype html>
<html><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>เช่าพระเครื่องออนไลน์ มูลนิธิสิรินธรราชวิทยาลัยในพระราชูปถัมภ์ : ตั้งกระทู้ใหม่</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link type="text/css" rel="stylesheet" href="../css/stylesheet.css" />
<?php
$serverName = "localhost";
$userName = "root";
$userPassword = "RocketSQL";
$dbName = "mydb";
$objCon = mysqli_connect($serverName,$userName,$userPassword,$dbName);
if(!$objCon){
echo $objCon->connect_error;
}
if(isset($_GET["Action"]) && $_GET["Action"] == "Save"){
//*** ตั้งกระทู้ใหม่ ***//
$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 = mysqli_query($strSQL);
header("location:webboard.php");
}
?>
<!-- InstanceEndEditable -->
<style type="text/css">
p.groove {border-style: groove}
body {
background-image: url(../Image/6840680-pattern-wallpaper.jpg);
background-repeat: repeat-x;
background-attachment: fixed;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
body,td,th {
font-family: "th chakra petch";
font-size: x-large;
color: #F00;
font-weight: bold;
}
p {
font-family: "Superspace Regular";
font-size: 16px;
color: #000;
font-weight: normal;
font-style: normal;
}
h1 {
font-family: "Superspace Regular";
font-size: 25px;
color: #00F;
font-weight: bold;
font-style: normal;
}
#rcorner1 {
border-radius: 10px;
border: 2px solid #0F0;
padding: 20px;
width: 220px;
height: 360px;
}
</style>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body topmargin="0">
<a name="toppage" id="toppage"></a>
<table width="964" border="1" align="center" cellpadding="0" cellspacing="0" class="groove" bordercolor="#FF00FF">
<tr>
<th colspan="2" scope="col"><img src="../images/TestTemplate_02.jpg" width="965" height="169"></th>
</tr>
<tr>
<td colspan="2"><img src="../images/TestTemplate_04.jpg" width="965" height="47" usemap="#Map"></td>
</tr>
<tr>
<td width="220" align="center" valign="top" bgcolor="#FFFFFF">
<div id="rcorner1">
<h1><img src="../Image/Login.png" width="30" height="31"> เข้าสู่ระบบ</h1>
<form role="form">
<div class="form-group">
<p align="left">
<label for="username">ชื่อผู้ใช้งาน (Username) :</label></p>
<input type="text" class="form-control input-lg" id="username" placeholder="ชื่อผู้ใช้">
</div>
<div class="form-group">
<p align="left">
<label for="pass">รหัสผ่าน (Password) :</label></p>
<input type="password" class="form-control input-lg" id="pass" placeholder="รหัสผ่าน">
</div>
<p><a href="#" class="btn btn-primary btn-md" role="button"><strong>สมัครสมาชิก</strong></a> <a href="#" class="btn btn-primary btn-md" role="button"><strong>เข้าสู่ระบบ</strong></a></p>
<p align="right">
<a href="#" class="btn btn-link" role="button"><strong>ลืมรหัสผ่าน >>></strong></a>
</form>
</div>
<h1><img src="../Image/clock.png" width="30" height="29"> เวลาปัจจุบัน</h1>
<p>
<iframe scrolling="no" frameborder="no" clocktype="html5" style="overflow:hidden;border:0;margin:0;padding:0;width:150px;height:150px;
"src="http://www.clocklink.com/html5embed.php?clock=005&timezone=GMT0700&color=orange&size=150&Title=&Message=&Target=&From=2016,1,1,0,0,0&Color=orange"></iframe>
</p>
<h1><img src="../Image/people.png" width="30" height="31"> จำนวนผู้เข้าชม </h1>
<p>
<!-- hitwebcounter Code START -->
<a href="http://www.hitwebcounter.com" target="_blank">
<img src="http://hitwebcounter.com/counter/counter.php?page=6312425&style=0010&nbdigits=5&type=ip&initCount=0" title="webs counters" Alt="webs counters" border="0" >
</a> <br/>
<!-- hitwebcounter.com --><a href="http://www.hitwebcounter.com" title="Total Count"
target="_blank" style="font-family: sans-serif, Arial, Helvetica;
font-size: 9px; color: #6D6C72; text-decoration: none ;"><strong>Total Count</strong></a>
<h1><img src="../Image/Time-Date-icon.png" width="30" height="29"> ปฏิทิน </h1>
<p>
<iframe src="https://calendar.google.com/calendar/embed?height=220&wkst=1&bgcolor=%23FFFFFF&src=rko22110%40gmail.com&color=%23A32929&ctz=Asia%2FBangkok" style="border-width:0" width="220" height="220" frameborder="0" scrolling="no"></iframe>
</p></td>
<td width="737" align="left" valign="top" bgcolor="#FFFFFF"><!-- InstanceBeginEditable name="MainContent1" -->
<p><a class="list-group-item active"><strong>+++ ตั้งกระทู้ใหม่ (New Topic) +++</strong></a></p>
<form action="newquestion.php?Action=Save" method="post" name="formMain" id="formMain" role="formgroup">
<table width="700" border="1" bordercolor="#CCCCCC" class="table table-bordered">
<tr>
<td width="95"><p><strong>หัวข้อกระทู้ :</strong></p></td>
<td><input name="txtQuestion" type="text" id="txtQuestion" value="" size="50"></td>
</tr>
<tr>
<td><p><strong>รายละเอียด :</strong></p></td>
<td><textarea name="txtDetail" type="text" cols="50" rows="5" id="txtDetails" value=""></textarea></td>
</tr>
<tr>
<td><p><strong>ผู้ตั้งกระทู้ :</strong></p></td>
<td width="626"><input name="txtName" type="text" id="txtName" value="" size="50"></td>
</tr>
<tr>
</table>
<p><strong><input name="btnSave" type="submit" id="btnSave" value="บันทึกข้อมูล >>>" class="btn btn-info btn-md"></strong></p>
</form>
<?php
mysqli_close($objCon);
?>
<!-- InstanceEndEditable -->
<table width="737" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><p><a href="../index.php">หน้าแรก</a> | <a href="../about.html">เกี่ยวกับมูลนิธิ</a> | <a href="../video.html">วีดีทัศน์</a> | <a href="../payment.html">วิธีการชำระเงิน</a> | <a href="../shipment.html">วิธีการจัดส่งสินค้า</a> | <a href="webboard.php">เว็บบอร์ด</a> | <a href="../contact.html">ติดต่อเรา</a> | <a href="#toppage"><img src="../Image/double-up-arrow-angles_318-53141.png" width="10" height="10"> กลับขึ้นด้านบน</a><br>
สงวนลิขสิทธิ์ ปี 2559 โดยมูลนิธิสิรินธรราชวิทยาลัย ในพระราชูปถัมภ์<br>
จัดทำ ออกแบบและดูแล Website โดย นายรังสิมันตุ์ วงษ์นิกร</p></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><img src="../images/TestTemplate_07.jpg" width="965" height="144"></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="12,5,91,40" href="../index.php">
<area shape="rect" coords="862,4,949,41" href="../contact.html">
<area shape="rect" coords="126,5,217,41" href="../productall.html">
<area shape="rect" coords="250,5,375,42" href="../payment.html">
<area shape="rect" coords="405,4,553,42" href="../shipment.html">
<area shape="rect" coords="734,5,826,43" href="webboard.php">
<area shape="rect" coords="578,6,703,42" href="../ceremony.html">
</map>
</body>
<!-- InstanceEnd --></html>
2) เพจ viewwebboard เมื่อทำการแสดงผลผ่านบราวเซอร์เสร็จ จะเกิดปัญหา Undefined Index : QuestionID ตรงบรรทัดที่ 142, 148 และ 166 (ภาพที่ 3)

(ภาพที่ 3)
ส่วนอันนี้เป็นโค้ดของเพจ viewwebboard ครับ
Code (PHP)
<!doctype html>
<html><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>เช่าพระเครื่องออนไลน์ มูลนิธิสิรินธรราชวิทยาลัย ในพระราชูปถัมภ์ : แสดงเนื้อหากระทู้และความคิดเห็น</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link type="text/css" rel="stylesheet" href="../css/stylesheet.css" />
<?php
$serverName = "localhost";
$userName = "root";
$userPassword = "RocketSQL";
$dbName = "mydb";
$objCon = mysqli_connect($serverName,$userName,$userPassword,$dbName);
if(!$objCon){
echo $objCon->connect_error;
exit();
}
if(isset($_GET["Action"]) && $_GET["Action"] == "Save"){
//*** เพิ่มความคิดเห็น ***//
$strSQL = "INSERT INTO reply ";
$strSQL .= "(QuestionID,CreateDate,Details,Name) ";
$strSQL .= "VALUES ";
$strSQL .= "('".$_GET["QuestionID"]."','".date("Y-m-d H:i:s")."','".$_POST["txtDetails"]."','".$_POST["txtName"]."') ";
$objQuery = mysqli_query($strSQL);
//*** อัพเดตความคิดเห็น ***//
$strSQL = "UPDATE webboard ";
$strSQL .= "SET Reply = Reply + 1 WHERE QuestionID = '".$_GET["QuestionID"]."' ";
$objQuery = mysqli_query($strSQL);
}
?>
เคยลองใช้ isset แก้ปัญหาข้อ 2 โดยใช้ if(isset($_GET["QuestionID"]) && $_GET["QuestionID"] == "") แต่ก็เกิดปัญหา Undefined Index : objResult (ภาพที่ 4)

(ภาพที่ 4)
เลยอยากถามสมาชิกว่า พอจะมีแนวทางในการแก้ปัญหาเหล่านี้บ้างหรือเปล่าครับ (ปล. ตอนนี้ยังเป็นมือใหม่หัดลองทำ PHP)
Tag : PHP, MySQL, HTML/CSS, Windows

|
ประวัติการแก้ไข 2016-03-04 10:24:30 2016-03-04 10:25:44 2016-03-04 10:26:24 2016-03-04 10:32:28 2016-03-04 14:16:04 2016-03-04 14:17:01 2016-03-04 14:18:13 2016-03-04 14:20:26 2016-03-06 14:11:38
|
 |
 |
 |
 |
Date :
2016-03-04 10:09:55 |
By :
Rocket |
View :
2527 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
if (!mysqli_query($con,"INSERT INTO Persons (FirstName) VALUES ('Glenn')"))
{
echo("Error description: " . mysqli_error($con));
}
ลองใช้การดักจับ Error ครับ ถ้า Insert ไม่ผ่านมันจะแสดงให้ทราบด้วย
|
 |
 |
 |
 |
Date :
2016-03-05 12:35:11 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตอนนี้เว็บบอร์ดสามารถเพิ่มกระทู้ใหม่ได้แล้ว โดยภาพที่ 1 เป็นการสร้างกระทู้ใหม่ และภาพที่ 2 เป็นกระทู้ใหม่ที่เพิ่มเข้ามาในเว็บบอร์ด

(ภาพที่ 1)

(ภาพที่ 2)
เมื่อเข้าไปในกระทู้แล้ว ก็เกิดปัญหาขึ้นได้แก่ จะไม่แสดงเนื้อหากระทู้ตามที่เราต้องการ และเวลาในการสร้างกระทู้ก็ยังไม่ตรงตามความเป็นจริง (ต้องไปแก้ข้อมูลอีกทีใน database) ดังเช่นภาพที่ 3

(ภาพที่ 3)
ไม่ทราบว่า พอจะมีแนวทางในการแก้ไขปัญหาเหล่านี้หรือไม่ครับ
|
ประวัติการแก้ไข 2016-03-06 18:28:30 2016-03-06 18:29:26 2016-03-06 18:29:46
 |
 |
 |
 |
Date :
2016-03-06 18:27:17 |
By :
Rocket |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เพจ viewwebboard ตอนนี้เหลือ error เพียงแค่ 2 บรรทัด แล้ว ดังภาพ

ตรงโค้ดบรรทัดที่ยังมีปัญหาอยู่
viewwebboard Code บรรทัดที่ยังมีปัญหาอยู่ (PHP)
<?php
//*** เลือกกระทู้ที่ต้องการ ***//
$strSQL = "SELECT * FROM webboard WHERE QuestionID = '".$_GET["QuestionID"]."' ";
$objQuery = mysqli_query($objCon,$strSQL);
$objResult = mysqli_fetch_array($objQuery);
//*** อัพเดตความคิดเห็น ***//
$strSQL = "UPDATE webboard ";
$strSQL .= "SET View = View + 1 WHERE QuestionID = '".$_GET["QuestionID"]."' ";
$objQuery = mysqli_query($objCon,$strSQL);
?>
ส่วนอันนี้คือโค้ดของเพจ viewwebboard แบบเต็ม
viewwebboard Code (PHP)
<!doctype html>
<html><!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-type" content="text/html"; charset="utf-8">
<!-- InstanceBeginEditable name="doctitle" -->
<title>เช่าพระเครื่องออนไลน์ มูลนิธิสิรินธรราชวิทยาลัย ในพระราชูปถัมภ์ : แสดงเนื้อหากระทู้และความคิดเห็น</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link type="text/css" rel="stylesheet" href="../css/stylesheet.css" />
<?php
$serverName = "localhost";
$userName = "root";
$userPassword = "RocketSQL";
$dbName = "mydb";
$objCon = mysqli_connect($serverName,$userName,$userPassword,$dbName);
$objQuery = mysqli_query($objCon,"SET NAMES UTF8");
if(!$objCon){
echo $objCon->connect_error;
exit();
}
if(isset($_GET["Action"]) && $_GET["Action"] == "Save"){
//*** เพิ่มความคิดเห็น ***//
$strSQL = "INSERT INTO reply ";
$strSQL .= "(QuestionID,CreateDate,Details,Name) ";
$strSQL .= "VALUES ";
$strSQL .= "('".$_GET["QuestionID"]."','".date("Y-m-d H:i:s")."','".$_POST["txtDetails"]."','".$_POST["txtName"]."') ";
$objQuery = mysqli_query($strSQL);
if(!mysqli_query($objCon,"INSERT INTO reply (QuestionID,CreateDate,Details,Name) VALUES ('".$_GET["QuestionID"]."','".date("Y-m-d H:i:s")."','".$_POST["txtDetails"]."','".$_POST["txtName"]."') ")){
echo ("บันทึกข้อมูลล้มเหลว" .mysqli_error($objCon));
}
//*** อัพเดตความคิดเห็น ***//
$strSQL = "UPDATE webboard ";
$strSQL .= "SET Reply = Reply + 1 WHERE QuestionID = '".$_GET["QuestionID"]."' ";
$objQuery = mysqli_query($strSQL);
}
?>
<!-- InstanceEndEditable -->
<style type="text/css">
p.groove {border-style: groove}
body {
background-image: url(../Image/6840680-pattern-wallpaper.jpg);
background-repeat: repeat-x;
background-attachment: fixed;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
body,td,th {
font-family: "th chakra petch";
font-size: x-large;
color: #F00;
font-weight: bold;
}
p {
font-family: "Superspace Regular";
font-size: 16px;
color: #000;
font-weight: normal;
font-style: normal;
}
h1 {
font-family: "Superspace Regular";
font-size: 25px;
color: #00F;
font-weight: bold;
font-style: normal;
}
#rcorner1 {
border-radius: 10px;
border: 2px solid #0F0;
padding: 20px;
width: 220px;
height: 360px;
}
</style>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body topmargin="0">
<a name="toppage" id="toppage"></a>
<table width="964" border="1" align="center" cellpadding="0" cellspacing="0" class="groove" bordercolor="#FF00FF">
<tr>
<th colspan="2" scope="col"><img src="../images/TestTemplate_02.jpg" width="965" height="169"></th>
</tr>
<tr>
<td colspan="2"><img src="../images/TestTemplate_04.jpg" width="965" height="47" usemap="#Map"></td>
</tr>
<tr>
<td width="220" align="center" valign="top" bgcolor="#FFFFFF">
<div id="rcorner1">
<h1><img src="../Image/Login.png" width="30" height="31"> เข้าสู่ระบบ</h1>
<form role="form">
<div class="form-group">
<p align="left">
<label for="username">ชื่อผู้ใช้งาน (Username) :</label></p>
<input type="text" class="form-control input-lg" id="username" placeholder="ชื่อผู้ใช้">
</div>
<div class="form-group">
<p align="left">
<label for="pass">รหัสผ่าน (Password) :</label></p>
<input type="password" class="form-control input-lg" id="pass" placeholder="รหัสผ่าน">
</div>
<p><a href="#" class="btn btn-primary btn-md" role="button"><strong>สมัครสมาชิก</strong></a> <a href="#" class="btn btn-primary btn-md" role="button"><strong>เข้าสู่ระบบ</strong></a></p>
<p align="right">
<a href="#" class="btn btn-link" role="button"><strong>ลืมรหัสผ่าน >>></strong></a>
</form>
</div>
<h1><img src="../Image/clock.png" width="30" height="29"> เวลาปัจจุบัน</h1>
<p>
<iframe scrolling="no" frameborder="no" clocktype="html5" style="overflow:hidden;border:0;margin:0;padding:0;width:150px;height:150px;
"src="http://www.clocklink.com/html5embed.php?clock=005&timezone=GMT0700&color=orange&size=150&Title=&Message=&Target=&From=2016,1,1,0,0,0&Color=orange"></iframe>
</p>
<h1><img src="../Image/people.png" width="30" height="31"> จำนวนผู้เข้าชม </h1>
<p>
<!-- hitwebcounter Code START -->
<a href="http://www.hitwebcounter.com" target="_blank">
<img src="http://hitwebcounter.com/counter/counter.php?page=6312425&style=0010&nbdigits=5&type=ip&initCount=0" title="webs counters" Alt="webs counters" border="0" >
</a> <br/>
<!-- hitwebcounter.com --><a href="http://www.hitwebcounter.com" title="Total Count"
target="_blank" style="font-family: sans-serif, Arial, Helvetica;
font-size: 9px; color: #6D6C72; text-decoration: none ;"><strong>Total Count</strong></a>
<h1><img src="../Image/Time-Date-icon.png" width="30" height="29"> ปฏิทิน </h1>
<p>
<iframe src="https://calendar.google.com/calendar/embed?height=220&wkst=1&bgcolor=%23FFFFFF&src=rko22110%40gmail.com&color=%23A32929&ctz=Asia%2FBangkok" style="border-width:0" width="220" height="220" frameborder="0" scrolling="no"></iframe>
</p></td>
<td width="737" align="left" valign="top" bgcolor="#FFFFFF"><!-- InstanceBeginEditable name="MainContent1" -->
<p><a class="list-group-item active"><strong>เนื้อหากระทู้และความคิดเห็น (Webboard Content & Comment) >>> </strong></a></p>
<?php
//*** เลือกกระทู้ที่ต้องการ ***//
$strSQL = "SELECT * FROM webboard WHERE QuestionID = '".$_GET["QuestionID"]."' ";
$objQuery = mysqli_query($objCon,$strSQL);
while($objResult = mysqli_fetch_array($objQuery)){
//*** อัพเดตความคิดเห็น ***//
$strSQL = "UPDATE webboard ";
$strSQL .= "SET View = View + 1 WHERE QuestionID = '".$_GET["QuestionID"]."' ";
$objQuery = mysqli_query($objCon,$strSQL);
}
?>
<table width="737" border="1" bordercolor="#CCCCCC" class="table table-bordered">
<tr>
<td colspan="2"><center><h1><?php echo $objResult["Question"];?></h1></center></td>
</tr>
<tr>
<td height="53" colspan="2"><?php echo $objResult["Details"];?></td>
</tr>
<tr>
<td width="397" align="left" valign="top"><p>ผู้ตั้ง : <?php echo $objResult["Name"];?> สร้างเมื่อวันที่ : <?php echo $objResult["CreateDate"];?></p></td>
<td width="253" align="left" valign="top"><p>เปิดอ่าน : <?php echo $objResult["View"];?> ตอบแล้ว : <?php echo $objResult["Reply"];?></p></td>
</tr>
</table>
<?php
$intRows = 0;
if(isset($_GET["QuestionID"]) && $_GET["QuestionID"] == ""){
$strSQL2 = "SELECT * FROM reply WHERE QuestionID = '".$_GET["QuestionID"]."' ";
$objQuery2 = mysqli_query($objCon,$strSQL2);
while($objResult2 = mysqli_fetch_array($objQuery2)){
$intRows++;
?>
No : <?php echo $intRows; ?>
<table width="737" border="1" bordercolor="#CCCCCC" class="table table-bordered">
<tr>
<td colspan="2"><center><h1><?php echo $objResult2["Details"];?></h1></center></td>
</tr>
<tr>
<td height="53" colspan="2"><p>ผู้ตั้ง :<?php echo $objResult2["Name"];?></p></td>
</tr>
<tr>
<td width="253"><p>สร้างเมื่อวันที่ : <?php echo $objResult2["CreateDate"];?></p></td>
</tr>
</table>
<?php
}
}
?>
<p align="left"><a href="webboard.php" class="btn btn-warning btn-md" role="button"><strong> >>> กลับไปยังหน้า "เว็บบอร์ด"</strong></a></p>
<form action="viewwebboard.php?QuestionID=<?php echo $_GET["QuestionID"];?>Action=Save" method="post" name="formMain" id="formMain" role="formgroup">
<table width="737" border="1" bordercolor="#CCCCCC" class="table table-bordered">
<tr>
<td><p><strong>รายละเอียด :</strong></p></td>
<td><textarea name="txtDetail" type="text" cols="50" rows="5" id="txtDetails" value=""></textarea></td>
</tr>
<tr>
<td><p><strong>ผู้ตั้งกระทู้ :</strong></p></td>
<td width="626"><input name="txtName" type="text" id="txtName" value="" size="50"></td>
</tr>
</table>
<p><strong><input name="btnSave" type="submit" id="btnSave" value="บันทึกข้อมูล >>>" class="btn btn-info btn-md"></strong></p>
</form>
<?php
mysqli_close($objCon);
?>
<!-- InstanceEndEditable -->
<table width="737" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top"><p><a href="../index.php">หน้าแรก</a> | <a href="../about.html">เกี่ยวกับมูลนิธิ</a> | <a href="../video.html">วีดีทัศน์</a> | <a href="../payment.html">วิธีการชำระเงิน</a> | <a href="../shipment.html">วิธีการจัดส่งสินค้า</a> | <a href="webboard.php">เว็บบอร์ด</a> | <a href="../contact.html">ติดต่อเรา</a> | <a href="#toppage"><img src="../Image/double-up-arrow-angles_318-53141.png" width="10" height="10"> กลับขึ้นด้านบน</a><br>
สงวนลิขสิทธิ์ ปี 2559 โดยมูลนิธิสิรินธรราชวิทยาลัย ในพระราชูปถัมภ์<br>
จัดทำ ออกแบบและดูแล Website โดย นายรังสิมันตุ์ วงษ์นิกร</p></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><img src="../images/TestTemplate_07.jpg" width="965" height="144"></td>
</tr>
</table>
<map name="Map">
<area shape="rect" coords="12,5,91,40" href="../index.php">
<area shape="rect" coords="862,4,949,41" href="../contact.html">
<area shape="rect" coords="126,5,217,41" href="../productall.html">
<area shape="rect" coords="250,5,375,42" href="../payment.html">
<area shape="rect" coords="405,4,553,42" href="../shipment.html">
<area shape="rect" coords="734,5,826,43" href="webboard.php">
<area shape="rect" coords="578,6,703,42" href="../ceremony.html">
</map>
</body>
<!-- InstanceEnd --></html>
เดี๋ยวจะลองพยายามหาทางแก้ปัญหาดูก่อน ถ้าใครพอมีวิธีแก้ปัญหานี้ก็แนะนำแนวทางมาได้นะครับ
|
ประวัติการแก้ไข 2016-03-07 11:34:54 2016-03-07 12:06:32
 |
 |
 |
 |
Date :
2016-03-07 11:34:13 |
By :
Rocket |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|