묻고답하기

수정 부분에서 왜 안되는 지 모르겠습니다...
수정을 하면 성공이라는 경고창이 뜨는데.. 리플래쉬 된것을 보면 수정 되지가
않아 있습니다.
지발... 도와 주십시요


<?
include "connect.php";
?>
<?
if($mode == 'del'){
    if(!$sno){
        echo" 없으니 그냥가라";
    }
   $del = mysql_query("delete from top where no='$sno'"); // 변수가 없다. 그래서삭제가 안된다.
   if($del){
      echo "<script>window.alert('성공')
      </script>";
      echo" <meta http-equiv='refresh' content='0; URL=pro-edit.php'>";
      exit;
  }else {
      echo "<script>window.alert('실패');history.back();
      </script>";
  }
}

if($mode == 'edit'){
    $query = "select name, content from top where no='$sno'";
    $result = mysql_query($query);
    $row = mysql_fetch_array($result);


?>

<html>
<head>
<link rel="stylesheet" type="text/css" href="type.css">
<body>

<form name="form" method="post" action="pro-edit_del.php?mode=editok&sno='$sno'">
<table border="1" cellspacing="0" cellpadding="3" width=500 bordercolordark="#ffffff" bordercolorlight="#919191"
style="color:#414141" align=center>
<tr>
<td align=center bgcolorw=#acd6ff> <b><center>문서 수정</center> </b></td>
</tr>
</table>
<table width="500" border="1" align=center cellspacing="0" cellpadding="3" width=500 bordercolordark="#ffffff" bordercolorlight="#919191">
<tr>
<td width="100" bgcolor=#acd6ff>이름</td>
<td width="400"><input type=/"text/" name=/"name/" size=/"10/" maxlenght=/"8/" value=<?echo $row[name] ?>> </td></tr>
<tr>
<td width="100" bgcolor=#acd6ff>비번</td>
<td><input type="password" name="pass" size="10" maxlenght="10"></td></tr>
<tr>
<td width="100" bgcolor=#acd6ff>내용</td>
<td><textarea name="content" rows="3" cols="50" wrap="virtual"><?echo $row[content] ?></textarea></td></tr>
</table>
<br>
<table width=500 align=center>
<tr>
<td align=center>
<input type=hidden name="no" value="<?echo $sno?>">
<input type=submit class=button value="수정"><input type=reset value="취소">
</td>
</tr>
</table>

</form>
</body>
</html>

<?
}
if ($mode == 'editok'){
     if(!$sno){
        echo " 없으니 그냥가라";
    }
    $editok = mysql_query("update top set name='$nameis' , content='$con' where no='$sno'");
   if($editok){
             echo "<script>window.alert('성공')</script>";
             echo "<meta http-equiv='refresh' content='0; URL=pro-edit.php'>";
             exit;
  }else {
      echo "<script>window.alert('실패');history.back();
      </script>";
  }

}

?>