메인 폼을 연동하고싶습니다.
본문
독학중인 학생입니다.
혼자 하려니 정말 어렵네요..
제가 하고싶은것은 index.php에 폼을 만들고
qalist.php 1:1문의 게시판에 입력받은 정보를 받아오고 싶습니다.
<?
$g5_path = ".."; // 그누보드가 있는 상대경로를 적어줌
?>
<script language="javascript">
var char_min = parseInt(<?=$write_min?>);
var char_max = parseInt(<?=$write_max?>);
</script>
<script type="text/javascript">
function checkFrm(obj) {
if(obj.wr_6.checked == false) {
alert('개인정보 활동동의에 체크해주세요.');
obj.wr_6.focus();
return false;
}
}
</script>
<table width=320 border="0" align="center" cellpadding="0" cellspacing="0" >
<form name=frm method=post action="<?=$g5['path']?>/bbs/write_update.php" onsubmit="return checkFrm(this);">
<input type=hidden name=w value="">
<input type=hidden name=bo_table value="online">
<input type=hidden name=wr_id value="">
<input type=hidden name=sca value="">
<input type=hidden name=sfl value="">
<input type=hidden name=stx value="">
<input type=hidden name=spt value="">
<input type=hidden name=sst value="">
<input type=hidden name=sod value="">
<input type=hidden name=s value="s">
<input type=hidden name=wr_subject value="빠른 상담 신청">
<input type=hidden name=wr_content value="빠른 상담 신청">
<input type=hidden name="wr_1" value="">
<tr>
<td width="320" height="150" align="center" valign=top style="border-bottom: 0px solid #ccc;">
<table width="320" border=0 cellpadding=0 cellspacing=0>
<tr>
<td width="50px" height="30px" style="padding-left:10px;">
<div class="style7">이름</div>
</td>
<td width="50"> <input class='quick' type="text" name="wr_name" size="22" style="font-size: 12px; height:20px;" required itemname="이름"></td>
<td width="79" rowspan="3">
<div align="right" >
<input name="image" type=image src="<?php echo $board_skin_url; ?>online/img/tyt04_bt03.png" alt="상담신청" >
</div>
</td>
</tr>
<tr>
<td height=40><div class="style7">휴대폰</div></td>
<td>
<select name="wr_7" style="height:20px" itemname="휴대폰" required >
<option value="010">010</option>
<option value="011">011</option>
<option value="016">016</option>
<option value="017">017</option>
<option value="018">018</option>
<option value="019">019</option>
</select>-
<input name="wr_8" type="text" required class='ed' style="width:35px;height:20px;border:1px solid #444444;" maxlength="4" itemname="휴대폰"/>-
<input name="wr_9" type="text" required class='ed' style="width:35px;height:20px;border:1px solid #444444;" maxlength="4" itemname="휴대폰"/></td>
</tr>
<tr>
<td width=50 height=30 style="padding-left:10px;">
<div class="style7">메모</div>
</td>
<td>
<input class='quick' type="text" name="wr_content" size="22" style="font-size: 12px; height:20px;" required itemname="메모">
</td>
</tr>
<tr align="center">
<td height="30" colspan="3">
<span class="style9">*고객님의 정보는 상담을 위해서만 사용됩니다.</span>
</td>
</tr>
<tr align="center">
<td colspan="3">
<input type=checkbox name=wr_6 value="6" <?=$write[wr_6]?> required>
<span class="style7">개인정보 활용동의</span><a href="../privacy.html" target="_blank"><img src="<?php echo $board_skin_url; ?>online/img/privacy.gif" width="50" height="16" border="0"></a>
</td>
</tr>
<tr align="center">
<td height="10" colspan="3"></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<!--//-->
제가 사용한 코드인데 어느부분을 변경해야할지 모르겠습니다.
도와주세요
답변 1
1:1문의에 글쓰기는 /bbs/qawrite_update.php 으로 값을 넘겨야합니다.
form action 값을 변경하고,
/bbs/qawrite.php 파일과
/skin/qa/basic/write.skin.php 파일을 참조해서 수정해보세요.