|
 |
|
ช่วยผมดู ERROR หน่อยครับ syntax ดูแล้วไม่น่าแต่ งงมาก !!ด่วน |
|
 |
|
|
 |
 |
|
<?
session_start();
if ($_SESSION[sess_userid] <>session_id() ) {
header( "Location: admin.php"); exit() ;
}
?>
<html>
<head><title>ระบบจัดการข่าวสาร </title></head>
<body>
<h2>:: ระบบจัดการข่าวสารสำหรับ Admin ::</h2>
<p> [ <A href="new_add.php">เพิ่มข่าวใหม่</A> ]
[ <A href="logout.php">ออกจากระบบ</A> ]</p>
<table border="1">
<TR bordercolor="#E8E8E8">
<td><center><B>No. </B></center></td>
<td><center><B>หัวข้อ</B></center></td>
<td><center><B>ประเภทข่าว</B></center></td>
<td><center><B>วันที่</B></center></td>
<td><center><B>[แก้ไข]</B></center></td>
<td><center><B>[ลบ]</B></center></td>
</TR>
<?
$no=1;
include "function.php";
include "connect.php";
$sql="select * from tb_new order by id_new desc";
$result=mysql_db_query($dbname,$sql);
while($r=mysql_fetch_array($result)) {
$id_new=$r[id_new];
$title_new=$r[title_new];
$type_new=$r[photo_new];
$date_new=displaydate($r[date_new]);
$time_new=$r[time_new];
echo "
<tr>
<td>$no</td>
<td>$title_new</td>
<td> $newtype[$type_new] </td>
<td>$date_new</td>
<td><A HREF=\"new_edit.php?id__edit=$id_new\">[แก้ไข] </A></td>
<td><A HREF=\"new_delete.php?id_del=$id_new&photo_del=$photo_new\" onclick=\"return confirm('ยืนยันการลบข่าว $title_new ')\">[ลบ]</A></td>
</tr>";
$no++;
}
mysql_close();
?>
</table>
</body>
</html>
ใช้ dream cs5 ตรวจ syntax ได้ครับ
|
 |
 |
 |
 |
Date :
2010-10-21 11:43:30 |
By :
num |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<?
session_start();
if ($_SESSION[sess_userid] <>session_id() ) {
header( "Location: admin.php"); exit() ;
}
?>
<html>
<head><title>ระบบจัดการข่าวสาร </title></head>
<body>
<h2>:: ระบบจัดการข่าวสารสำหรับ Admin ::</h2>
<p> [ <A href="new_add.php">เพิ่มข่าวใหม่</A> ]
[ <A href="logout.php">ออกจากระบบ</A> ]</p>
<table border="1">
<TR bordercolor="#E8E8E8">
<td><center><B>No. </B></center></td>
<td><center><B>หัวข้อ</B></center></td>
<td><center><B>ประเภทข่าว</B></center></td>
<td><center><B>วันที่</B></center></td>
<td><center><B>[แก้ไข]</B></center></td>
<td><center><B>[ลบ]</B></center></td>
</TR>
<?
$no=1;
include "function.php";
include "connect.php";
$sql="select * from tb_new order by id_new desc";
$result=mysql_db_query($dbname,$sql);
while($r=mysql_fetch_array($result)) {
$id_new=$r[id_new];
$title_new=$r[title_new];
$type_new=$r[photo_new];
$date_new=displaydate($r[date_new]);
$time_new=$r[time_new];
echo "
<tr>
<td>$no</td>
<td>$title_new</td>
<td> $newtype[$type_new] </td>
<td>$date_new</td>
<td><A HREF=\"new_edit.php?id__edit=$id_new\">[แก้ไข] </A></td>
<td><A HREF=\"new_delete.php?id_del=$id_new&photo_del=$photo_new\" onclick=\"return confirm('ยืนยันการลบข่าว $title_new ')\">[ลบ]</A></td>
</tr>";
$no++;
}
mysql_close();
?>
</table>
</body>
</html>
ระหว่าง \ กับ " ให้พิมพ์ติดกันครับ ไม่งั้นมันจะมองเป็นคนละเครื่องหมาย ไม่มีผลใดๆ
ต้องพิมพ์ \" นะครับ ไม่ใช่ \ "
|
 |
 |
 |
 |
Date :
2010-10-21 12:13:09 |
By :
adaaugusta |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|