그누4 폼메일을 <div> 안에 include 했는데 submit 에러가 나요...
관련링크
본문
메인페이지에는
<div id="gotop">
<table cellpadding="0" cellspacing="0" width="150" height="260" background="images/scroll.jpg">
<tr>
<td width="150" height="50" valign="top">
</td>
</tr>
<tr>
<td width="150" height="130" valign="top"><? include_once("$g4[path]/online.php"); // 온라인문의 ?></td>
</tr>
</table>
</div>
online.php 파일은 아래와 같아요...
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>온라인문의</title>
</head>
<script type="text/javascript">
/* 자바스크립트에서 사용하는 전역변수 선언 */
var g4_path = "<?=$g4['path']?>";
</script>
<STYLE type=text/css>
.menufont {font-family: 돋움, verdana; font-size: 8pt; color: #000000;}
.menufont:hover {font-family: 돋움, verdana; font-size: 8pt; color: #F26522; font-weight: bold;}
</STYLE>
<form name="cfrm" method="post" onsubmit="return cfrm_submit(this);">
<table width="140" border="0" cellspacing="0" cellpadding="0" align=center>
<colgroup>
<col width="100">
<col>
</colgroup>
<tr>
<td class=menufont>이름</td>
<td>
<input type="text" name="ol_name" required itemname="이름" maxlength=10 size="12">
</td>
</tr>
<tr>
<td class=menufont>연락처</td>
<td>
<input type="text" name="ol_tel" itemname="연락처" maxlength=20 size="12">
</td>
</tr>
<tr>
<td class=menufont>메모</td>
<td>
<textarea style="width:100%;height:80px;" name="ol_memo" itemname="메모"></textarea>
</td>
</tr>
<tr>
<td align=center colspan="2">
<input type="submit" value="문의하기" align="center"></td>
</tr>
</table>
</form>
<script type='text/javascript'>
function cfrm_submit(f)
{
f.action = "./online_update.php";
return true;
}
</script>
<script type="text/javascript" src="./js/wrest.js"></script>
</body>
</html>
홈페이지주소/bbs/online.php (저는 그누보드를 bbs하위폴더로 관리)로 연결할때는submit 이 되는데
메인페이지에서 div 안에 <? include_once("$g4[path]/online.php"); // 온라인문의 ?> 이렇게 하면 404 에러가 나요..ㅠㅠ 왜 그럴까요??
답변 2
<STYLE type=text/css>
.menufont {font-family: 돋움, verdana; font-size: 8pt; color: #000000;}
.menufont:hover {font-family: 돋움, verdana; font-size: 8pt; color: #F26522; font-weight: bold;}
</STYLE>
<form name="cfrm" method="post" onsubmit="return cfrm_submit(this);">
<table width="140" border="0" cellspacing="0" cellpadding="0" align=center>
<colgroup>
<col width="100">
<col>
</colgroup>
<tr>
<td class=menufont>이름</td>
<td>
<input type="text" name="ol_name" required itemname="이름" maxlength=10 size="12">
</td>
</tr>
<tr>
<td class=menufont>연락처</td>
<td>
<input type="text" name="ol_tel" itemname="연락처" maxlength=20 size="12">
</td>
</tr>
<tr>
<td class=menufont>메모</td>
<td>
<textarea style="width:100%;height:80px;" name="ol_memo" itemname="메모"></textarea>
</td>
</tr>
<tr>
<td align=center colspan="2">
<input type="submit" value="문의하기" align="center"></td>
</tr>
</table>
</form>
<script type='text/javascript'>
function cfrm_submit(f)
{
f.action = "./online_update.php";
return true;
}
</script>
요거만 인크루드....
online.php 와 update.php가
위치가
www 안에 위치하고 있나요 ?