g_num값은 update.php 로 값이 보내져서 출력이 되는데
글 수정이 제목이랑 내용만 백지로 수정돼.
<?=$rec[g_content]?> 내용값
<?=$rec[g_subject]?> 제목값이 update.php로 안넘어 가는데 뭔가 문제임??
글을 작성후 수정할때 데이터베이스에 제목이랑 내용이 백지로 들어간다 기존 내용조차 사라짐...
완전 초짜라서 인강보고 따라햇다가 안돼니 빡침
<form action=update.php?g_num=<?=$g_num?> method=post>
<table >
<tr>
<th align=center height=20><font>글 수 정</font>
<tr>
<?
include "db_connect.php";
$query="select * from testboard where g_num=$g_num";
$result = mysql_query($query, $conn);
$rec = mysql_fetch_array($result);
?>
<td >
<table>
<tr>
<th>아이디
<td> <p>  <?=$_SESSION['id'];?> </p>
<tr>
<th>제 목
<td> <input type=text name=subject size=68 maxlength=40 value="<?=$rec[g_subject]?>">
<tr>
<th>내 용
<td> <textarea name=content cols=70 rows=15> <?=$rec[g_content]?> </textarea>
<tr>
<td colspan=2 align=center height=30>
<input type=submit class="bt blue medium" value=' 저장 '>  
<input type=reset class="bt blue medium" value=' 다시쓰기 '>  
<input type=button class="bt blue medium" value=' 이전 ' >
</table>
</td>
</tr>
</table>
</form>
테스트