묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
사진첩소스 인데 화면이 안떠요 -0- 부탁 드려요~
2004.07.28 10:32
<?
$conn = mysql_connect('localhost','root','apmsetup');
mysql_select_db('semple1',$conn);
$query = "select filename,intro from gallay where number = $number";
$result = mysql_query($query, $conn);
$data =mysql_fetch_array($result,$conn);
$a = $data[filename];
$img = "img/".$a;
$intro = nl2br($data[intro]);
$is_prev_query = "select number from gallay";
$is_prev_query .= " where number > $number order by number asc limit 1";
$is_next_query = "select number from gallay";
$is_next_query .= " where number < $number order by number desc limit 1";
$is_prev_result = mysql_query($is_prev_query,$conn);
if(mysql_num_rows($is_prev_result)){
$prev_number = mysql_result($is_prev_result,0,"number");
$prev = "[<a href=view.html?number=$prev_number>이전</a>]";
}else{
$prev = "[이전]";
}
$is_next_result = mysql_query($is_next_query,$conn);
if(mysql_num_rows($is_next_result)){
$next_number =mysql_result($is_next_result,0,"number");
$next = "[<a href=view.html?number=$next_number>다음</a>]";
}else{
$next = "[다음]";
}
mysql_error;
mysql_close($conn);
?>
<html>
<head>
<title>php예제</title>
<script>
function del_confirm(){
var result = confirm('+ '+ '그림을 삭제 하시겠습니까?');
if(result == true){
document.location.href = 'del_post.php?number=<?echo $number; ?>'+ ';
}
}
</script>
</head>
<body bgcolor=white link=blue alink=orange vlink=blue>
<center>
<table border=1 cellspacing=0 cellpadding=5 bordercolor=#ffccff>
<tr>
<td>
<img src=<?echo $img;?>>
</td>
</tr>
</table>
<hr width=80%>
<?echo $data[intro];?>
<?echo $number;?>
<hr width=80%>
<?echo $prev;?>
[<a herf=write.html>등록</a>]
[<a herf=list.html>목록</a>]
[<a href=mod.html?number=<?echo $number;?>>수정</a>]
[<a herf=javascript:del_confirm()l>삭제</a>]
<?echo $next;?>
</center>
</body>
</html>
-----------------------------------------------------------
화면에 에러 표시는 안나는데 img 가 뜨질 않고 글내용인 intro 도 안뜨내요
제 mysql id 는 root 이고 pass 는 apmsetup 입니다
그리고 db 는 semple1 이고 테이블은 gallay 입니다.
아려주세요~ㅠ.ㅜ
$conn = mysql_connect('localhost','root','apmsetup');
mysql_select_db('semple1',$conn);
$query = "select filename,intro from gallay where number = $number";
$result = mysql_query($query, $conn);
$data =mysql_fetch_array($result,$conn);
$a = $data[filename];
$img = "img/".$a;
$intro = nl2br($data[intro]);
$is_prev_query = "select number from gallay";
$is_prev_query .= " where number > $number order by number asc limit 1";
$is_next_query = "select number from gallay";
$is_next_query .= " where number < $number order by number desc limit 1";
$is_prev_result = mysql_query($is_prev_query,$conn);
if(mysql_num_rows($is_prev_result)){
$prev_number = mysql_result($is_prev_result,0,"number");
$prev = "[<a href=view.html?number=$prev_number>이전</a>]";
}else{
$prev = "[이전]";
}
$is_next_result = mysql_query($is_next_query,$conn);
if(mysql_num_rows($is_next_result)){
$next_number =mysql_result($is_next_result,0,"number");
$next = "[<a href=view.html?number=$next_number>다음</a>]";
}else{
$next = "[다음]";
}
mysql_error;
mysql_close($conn);
?>
<html>
<head>
<title>php예제</title>
<script>
function del_confirm(){
var result = confirm('+ '+ '그림을 삭제 하시겠습니까?');
if(result == true){
document.location.href = 'del_post.php?number=<?echo $number; ?>'+ ';
}
}
</script>
</head>
<body bgcolor=white link=blue alink=orange vlink=blue>
<center>
<table border=1 cellspacing=0 cellpadding=5 bordercolor=#ffccff>
<tr>
<td>
<img src=<?echo $img;?>>
</td>
</tr>
</table>
<hr width=80%>
<?echo $data[intro];?>
<?echo $number;?>
<hr width=80%>
<?echo $prev;?>
[<a herf=write.html>등록</a>]
[<a herf=list.html>목록</a>]
[<a href=mod.html?number=<?echo $number;?>>수정</a>]
[<a herf=javascript:del_confirm()l>삭제</a>]
<?echo $next;?>
</center>
</body>
</html>
-----------------------------------------------------------
화면에 에러 표시는 안나는데 img 가 뜨질 않고 글내용인 intro 도 안뜨내요
제 mysql id 는 root 이고 pass 는 apmsetup 입니다
그리고 db 는 semple1 이고 테이블은 gallay 입니다.
아려주세요~ㅠ.ㅜ