<?php include ("chksession.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>นำคำถามที่ผู้ใช้ตั้งออกมาแสดง</title> </head> <body> <h4 align="right"><?php echo "คุณเข้าสู่ระบบในชื่อ : <a href='show_member.php'>$sess_username</a>";?></h4> <h4 align="right"><?php echo "<a href='logout.php'>ออกจากระบบ</a>";?></h4> <h3><?php echo"Webboard กระทู้ถาม - ตอบ";?></h3> <p> [<a href="main.php">หน้าหลัก</a>]</p><hr /> <?php include ("connect.php"); include ("function.php"); //$sql="select * from webboard order by webboard_id desc"; //$result=mysql_db_query('test_fu',$sql); $connect=mysql_connect("localhost","root",""); mysql_select_db("test_fu",$connect); $result=mysql_query("select * from webboard order by webboard_id desc",$connect); $num=mysql_num_rows($result); echo "<a href='webboard.php'>ตั้งคำถามใหม่</a><p> <table width='80%' border='1'> <tr bgcolor='#D2E9FF'> <td width='8%'><center><b><font size='2' face='MS Sans Serif'>รหัส</font></b></center></td> <td width='61%'><center><b><font size='2' face='MS Sans Serif'>หัวข้อคำถาม</font></b></center></td> <td width='15%'><center><b><font size='2' face='MS Sans Serif'>ผู้ตั้งคำถาม</font></b></center></td> <td width='16%'><center><b><font size='2' face='MS Sans Serif'>ตั้งเมื่อวันที่</font></b></center></td> </tr>"; while ($record=mysql_fetch_array($result)) { $webboard_id=$record['webboard_id']; //อย่าลืมใส่ quote ด้วยน่ะ ลืมตลอดเลย $webboard_topic=$record['webboard_topic']; $webboard_message=$record['webboard_message']; $webboard_date=$record['webboard_date']; $user_id=$record['user_id']; $webboard_topic=htmlspecialchars($webboard_topic); $user_id=htmlspecialchars($user_id); $webboard_message=nl2br(htmlspecialchars($webboard_message)); $webboard_date=displaydate($webboard_date); echo "<tr bgcolor='#FFFFFF'> <td width='8%'><center><font size='2' face='MS Sans Serif'>$webboard_id</font></center> </td> <td width='61%'><center><font size='2' face='MS Sans Serif'> <a href='ansWebboard_view.php?webboard_id=$webboard_id'>$webboard_topic</a></font></center> </td> <td width='15%'><center><font size='2' face='MS Sans Serif'>$user_id</font></center> </td> <td width='16%'><center><font size='2' face='MS Sans Serif'>$webboard_date</td> </tr>"; } echo "</table>"; ?> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง