من بالاخره از این طریق تونستم کارم رو انجام بدم اما کد من یه ایراد داره اون هم این هست که زمانی که صفحه باز میشه نظر من از حالت نظر جدید خارج میشه و اگر هم تغییر حالت بدم به نظر جدید زمانی که می خوام این نظر رو به وضعیت قابل نمایش یا غیر قابل نمایش تغییر بدم نظر من از حالت جدید در میاد چکار باید بکنم ؟
<?
include('signin.php');
if (!$ok_cookie) {exit;}
if (isset($_GET['bankname'])) $bankname=$_GET['bankname'];
if (isset($_REQUEST['code'])) $code=$_REQUEST['code'];
if (isset($_GET['view'])) $view = $_GET['view'];
if (isset($_GET['newcomment'])) $new = $_GET['newcomment'];
$cpage=basename($PHP_SELF);
require_once('../include/connect.php');
require_once("../fckeditor/fckeditor.php") ;
mysql_query("update $bankname set new='n' where radif='$code'");
if ($view!=''){
$update="update $bankname set view='$view' where radif='$code'";
$view='';
mysql_query($update);
}
if ($new!=''){
$update="update $bankname set new='$new' where radif='$code'";
$new='';
mysql_query($update);
}
$select="select * from $bankname where radif='$code'";
$query=mysql_query($select);
$row=mysql_fetch_assoc($query);
$name=$row['name'];
$email=$row['email'];
$subject=$row['subject'];
$text=$row['text'];
$ip=$row['ip'];
$date=$row['date'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<LINK REL="StyleSheet" HREF="main.css" type="text/css">
<SCRIPT LANGUAGE="JavaScript" src="../java/farsi.js" ></script>
</script>
</head>
<body>
<div>
<table align="center" border="0" dir="rtl" width="70%" cellpadding="2">
<tr align="center">
<td><font color="#6699FF" face="Tahoma" size="2">آي پي</font></td>
<td><font color="#CC33FF" face="Tahoma" size="2"><?echo $ip;?></font></td>
<td><font color="#6699FF" face="Tahoma" size="2">تاريخ ارسال</font></td>
<td><font color="#CC33FF" face="Tahoma" size="2"><?echo $date;?></font></td>
<td >
<font color="#6699FF" face="Tahoma" size="2"><a href='comment.php?bankname=<?echo $bankname?>&code=<?echo $code?>&view=<?if ($row['view']=='n') echo "y"; else echo "n";?>'><?if ($row['view']=='n') echo 'غيرقابل مشاهده';else echo 'قابل مشاهده';?></a></font></td>
<td><font color="#6699FF" face="Tahoma" size="2"><a href='comment.php?bankname=<?echo $bankname?>&code=<?echo $code?>&newcomment=y'><?if ($row['new']=='n') echo 'تغيير به حالت جديد';?></a></font></td>
</tr>
</table>
</div>
<table dir="rtl" width="100%" cellpadding="3">
<tr>
<td><font color="blue" face="Tahoma" size="2">نام و نام خانوادگي</font></td>
<td><input name="name" value="<?echo $name?>" tabindex="1" maxlength="90" size="100" /></td>
</tr>
<tr>
<td><font color="blue" face="Tahoma" size="2">پست الکتونيک</font></td>
<td><input name="email" value="<?echo $email?>" tabindex="2" maxlength="90" size="100" /></td>
</tr>
<tr>
<td><font color="blue" face="Tahoma" size="2">عنوان نظر</font></td>
<td><input name="subject" value="<?echo $subject?>" tabindex="3" maxlength="90" size="100"/></td>
</tr>
<tr>
<td><font color="blue" face="Tahoma" size="2">متن نظر</font></td>
<td><textarea name="text" rows="10" cols="75" tabindex="4" >
<?echo $text?>
</textarea></td>
</tr>
<tr>
<td><font color="blue" face="Tahoma" size="2">پاسخ نظر</font></td>
<td>
<?php
$oFCKeditor = new FCKeditor('text') ;
$oFCKeditor->BasePath = '../fckeditor/';
$oFCKeditor->Config['DefaultLanguage']='fa' ;
$oFCKeditor->Config['ContentLangDirection']='rtl' ;
$oFCKeditor->Value= $text;
$oFCKeditor->Create() ;
?>
</td>
</tr>
</table>
</body>
</html>