홈페이지 첫화면에서 그누보드로 게사판으로 값을 입력하려고 합니다.
본문
홈페이지 첫 화면에서 이메일 주소를 받아서
그누보드 게시판에 저장하려고 합니다.
게시판은 만들었고
홈페이지 첫 화면 쪽에 form 과 hidden 부분을 가져왔습니다.
bo_table의 tb_email 값은 게시판 id입니다.
그런데 값이 저장이 안되네요. 뭐가 잘못된걸까요?
폼 안쪽은 <div class="write_div">로 감쌌습니다.
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" style="<?php echo $width ?>">
<input type="hidden" name="uid" value="<?php echo get_uniqid(); ?>">
<input type="hidden" name="w" value="w">
<input type="hidden" name="bo_table" value="tb_email">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="spt" value="<?php echo $spt ?>">
<input type="hidden" name="sst" value="<?php echo $sst ?>">
<input type="hidden" name="sod" value="<?php echo $sod ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
답변 2
action="<?php echo $action_url ?>" 변경
action="bbs/write_update.php"
<input type="hidden" name="w" value="w">변경
<input type="hidden" name="w" value="">
fwrite_submit() 함수를 복사해서 해당 페이지에 넣었나요?
캡챠처리는 어떻게 하였나요?
action="<?php echo $action_url ?>"
여기에 url이 제대로 있는지 확인해 보시고
결국은
bbs/write_update.php에
$sql = " insert into {$g5['board_file_table']}
set bo_table = '{$bo_table}',
wr_id = '{$wr_id}',
bf_no = '{$i}',
bf_source = '{$upload[$i]['source']}',
bf_file = '{$upload[$i]['file']}',
bf_content = '{$bf_content[$i]}',
bf_fileurl = '{$upload[$i]['fileurl']}',
bf_thumburl = '{$upload[$i]['thumburl']}',
bf_storage = '{$upload[$i]['storage']}',
bf_download = 0,
bf_filesize = '".(int)$upload[$i]['filesize']."',
bf_width = '".$bf_width."',
bf_height = '".$bf_height."',
bf_type = '".$bf_type."',
bf_datetime = '".G5_TIME_YMDHIS."' ";
sql_query($sql);
여기서 처리가 될 겁니다.
sql_query($sql,true); exit;
하셔서 에러 메시지가 있는지 확인해 보세요.