묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
소스 좀봐주세요........[급........함]
2002.03.02 15:23
수정 부분에서 왜 안되는 지 모르겠습니다...
수정을 하면 성공이라는 경고창이 뜨는데.. 리플래쉬 된것을 보면 수정 되지가
않아 있습니다.
지발... 도와 주십시요
<?
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>";
}
}
?>
수정을 하면 성공이라는 경고창이 뜨는데.. 리플래쉬 된것을 보면 수정 되지가
않아 있습니다.
지발... 도와 주십시요
<?
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>";
}
}
?>
댓글 0
글쓴이 | 제목 | 최종 글 |
---|---|---|
XE | 공지 글 쓰기,삭제 운영방식 변경 공지 [16] | 2019.03.05 by 남기남 |
김심술 | XE 모듈 중.. 타임라인 모듈을 설치한 후 부터, HTTP 500 애러가 납니다. [2] | 2020.08.16 by 천재 |
ahhas**** | HTTP ERROR 500 [3] | 2020.09.14 by Luatic™ |
걱정이야 | 홈페이지 이전후 오류가 발생합니다 [1] | 2020.10.27 by sejin7940 |
최갑균 | 글 작성시 태그를 쓰면 글이 등록이 안됩니다. | |
녹용껌 | 외부페이지 include 문제 [1] | 2021.02.23 by 오뎅궁물 |
깜주 | xe코어 1.11.6 설치시 apm 버전 도움요청합니다. | |
on | 관리자 계정 로그인 오류 [1] | 2021.09.13 by sejin7940 |
stopseok | 게시판 첨부파일 버튼을 사용할수가 없습니다 [4] | 2021.10.05 by myjin |
himan | board dx http 500문제 [1] | 2022.01.24 by sejin7940 |
배정현 | 코어 업데이트 이후에 HTTP ERROR 500 | |
sa****1876f | 호스팅 이전 후 세팅했는데 에러라고.. [1] | 2022.12.21 by GX디자인 |
roks821 | 전문가의 긴급 도움을 요청합니다. 레이아웃. 위젯. bodex 게시판 [1] | 2023.03.17 by roks821 |
t**** | 관리자페이지 에러 [4] | 2023.12.20 by t**** |