게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
php잘아시는분들 도와주세요
게시물ID : jisik_77903짧은주소 복사하기
작성자 : 강두
추천 : 0
조회수 : 423회
댓글수 : 5개
등록시간 : 2010/05/31 21:22:26
php로 게시판 제작중인데요

이게 리스트에서

올라온 글을 클릭했을때

그 글의 내용을 보여주는 소스이거든요 

그런데 에러는안나는데

이름, 제목, 내용 이런게 하나도 안나와요

제생각에는 아무래도 변수를 불러들이지 못하는것같은데

어떻게 수정해줘야될지...

도와주세요


<?
$con=mysql_connect("localhost","root","123"); 
$db=mysql_select_db("sbcsi",$con);
$sql="select * from phpboard where 'num' = '$num' ";
$result=mysql_query($sql,$con); 

$numrows=mysql_num_rows($result);
$rows=mysql_fetch_array($result);
$name=$rows[name]; 
$subject=$rows[subject]; 
$content=nl2br(htmlspecialchars($rows[content]));
?> 

<html>
<head> 
<title>red</title> 
</head> 
<body> 
<table border=1 align=center width=680> 
<tr> 
<td width=80>num</td><td width=600><?=$num?></td> 
</tr> 
<tr> 
<td width=80>name</td><td width=600><?=$name?></td> 
</tr> 
<tr> 
<td width=80>subject</td><td width=600><?=$subject?></td> 
</tr> 
<tr> 
<td width=80>content</td><td width=600><?=$content?></td> 
</tr> 
</table> 
<center><a href="list.php">list</a></center> 
</body> 
</html> 
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호