ช่วยดูโค้ดหน้านี้หน่อยค่ะ มัน Error อะไรบางอย่างซึ่งดูไม่ออกค่ะ
มันแจ้ง error แบบนี้ค่ะ
Code
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\panthongtae\int2.php:12) in C:\AppServ\www\panthongtae\menulogin.php on line 2
Code (PHP)
<?
session_start();
if (isset($_SESSION['valid_username'])) {
require("connect.php");
$username = $_SESSION['valid_username'];
$rs = mysql_query("select * from member where username='$username';");
$cols=mysql_fetch_array($rs) or die(mysql_error());
$name = $cols['name'] . ' ' . $cols['lname'];
$mem_id = $cols['mem_id'];
}else{
echo "<script>
alert('กรุณาเข้าสู่ระบบ');
location.href = 'index.php';
</script>";
exit();
}
function thaiDate($date){
$arrMonth = array("", "ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.");
$arrDate = split('-', $date);
return sprintf("%d %s %d", $arrDate[2], $arrMonth[intval($arrDate[1])], substr($arrDate[0]+543,2,2));
} // function thaiDate($date){
function thaiDateTime($datetime){
$arrMonth = array("", "ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.");
$arrDateTime = split(' ', $datetime);
$arrDate = split('-', $arrDateTime[0]);
return sprintf("%d %s %d %sน.", $arrDate[2], $arrMonth[intval($arrDate[1])], substr($arrDate[0]+543,2,2), substr($arrDateTime[1],0,5));
} // function thaiDate($date){
?>
<?php
$sql = "SELECT * FROM member WHERE username='{$username}';";
$rs = mysql_query($sql) or die(mysql_error());
$cols = mysql_fetch_array($rs);
?>
<!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=windows-874" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style2 {color: #FFCC00}
.style3 {color: #FFFFFF}
.style4 {font-size: 12px}
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif}
.style9 {font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF;}
.style10 {font-size: 14}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
</head>
<body>
<table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#540300">
<tr>
<td><table width="244" border="0">
<tr>
<td width="238" height="136" valign="top" bgcolor="#540300"><table width="192" border="0" align="center">
<tr>
<td width="189" bgcolor="#540300">
<table width="184" border="0">
<tr>
<td colspan="2"><div align="center" class="style3 style5 style4"><a href="editmem1.php?mem_id=<? echo $mem_id;?>">ข้อมูลส่วนตัว</a></div></td>
</tr>
<tr>
<td width="104"><span class="style3 style5 style4">รหัสผู้ใช้ :</span></td>
<td width="182"><span class="style4 style3">
<?=$username?>
</span></td>
</tr>
<tr>
<td><div align="center" class="style3 style5 style4">
<div align="left">ชื่อผู้ใช้ :</div>
</div></td>
<td><span class="style4 style3">
<?=$name?>
</span></td>
</tr>
<tr>
<td colspan="2" bgcolor="#540300"><span class="style5" style="font-size: 12px"><a href="change_password.php" style="color:white; text-decoration: none;"><br />
- เปลี่ยนรหัสผ่าน</a><a href="order_form.php" style="color:white; text-decoration: none;"><br />
- แบบฟอร์มแจ้งสินค้าจ้างทำ<br />
</a><a href="order_list.php" style="color:white; text-decoration: none;">- รายการแจ้งสินค้าจ้างทำ<br />
<br />
</a></span></td>
</tr>
</table>
</td>
</tr>
</table>
<form id="form1" name="form1" method="post" action="logout.php">
<div align="center">
<input type="submit" name="button" id="button" value="Logout" />
</div>
</form>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#540300"><table width="200" border="0" cellspacing="0" cellpadding="0" bgcolor="#540300">
<tr></tr>
</table>
<table width="236" height="461" border="0" cellpadding="0" cellspacing="0" bgcolor="#540300">
<tr>
<td height="20" colspan="3" bgcolor="#540300"><img src="headcat.gif" width="236" height="130" /></td>
</tr>
<tr>
<td width="20" " align="center" background="11.gif" bgcolor="#540300"> </td>
<td width="198" valign="top" bgcolor="#540300"><span class="style10">
<span class="style5">
<?php
$sql_type="SELECT * FROM category ORDER BY cat_id";
$data_type= mysql_query($sql_type) or die(mysql_error());
while ($rowc = mysql_fetch_row($data_type))
{
?>
<a href='show.php?cat_id=<?php echo $rowc[0]; ?>'><?php echo $rowc[1]; ?><br />
</a>
<?php
}
?>
</span><br />
</span></td>
<td width="20" background="11.gif" bgcolor="#540300"> </td>
</tr>
<tr>
<td height="19" colspan="3" background="2.gif" bgcolor="#540300"> </td>
</tr>
<tr>
<td height="151" colspan="3" valign="top" bgcolor="#540300" ><p class="style10"><br />
<span class="style9 style3 style5"> <img src="icon.gif" alt="" width="18" height="14" /> ประวัติทองคำ</span><span class="style9"><br />
<img src="icon.gif" alt="" width="18" height="14" /> แผนที่ร้าน<br />
<img src="icon.gif" alt="" width="18" height="14" /> เกี่ยวกับเรา<br />
<img src="icon.gif" alt="" width="18" height="14" /> <a href="faq.php">คำถามที่พบบ่อย</a><br />
<img src="icon.gif" alt="" width="18" height="14" /> <a href="board.php">เว็บบอร์ด</a></span><span class="style9 style5"><br />
<img src="icon.gif" width="18" height="14" /> <a href="formadminlogin.php">สำหรับผู้ดูแลระบบ</a></span></p></td>
</tr>
<tr>
<td height="19" colspan="3" bgcolor="#540300" ><div align="center">
<p>
<!-- Your Page ID: 112835 -->
<span class="style11"><span class="style12 style2"><br />
ผู้เยี่ยมชมเว็บไซต์</span></span><br />
<br />
<img style="border: 0px" src="http://www.bestfreehitcounters.com/count.php?page=112835" /><br />
<span style="color: #540300"><a href="http://www.millennialliving.com/content/ground-versus-above-ground-pools-what-difference
" target="_blank" title="Ground Pools
" style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 10px; text-decoration: none; color: #314321">Ground Pools </a> </span></p>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<p>
</body>
</style>
</html>
Tag : PHP, MySQL
Date :
2011-07-15 12:47:30
By :
myminthom
View :
780
Reply :
2
Error นี้มีเยอะครับ ลองค้นหาจากระทู้เก่า ๆ ก็ได้ครับ
Date :
2011-07-15 13:02:43
By :
webmaster
ขอบคุณค่ะ
Date :
2011-07-15 13:13:43
By :
myminthom
Load balance : Server 04