form이 두개가 있는데 이거 어떻게 처리해야하나요 고수님들...

form이 두개가 있는데 이거 어떻게 처리해야하나요 고수님들...

QA

form이 두개가 있는데 이거 어떻게 처리해야하나요 고수님들...

본문

죄송합니다 그누보드는 아니지만 고수분들은 알것 같아서 물어봅니다.

form하나는 검색이고 form 하나는 디비로 보내는 겁니다.

 

하지만 검색한 내용도 디비로 보내야하는데...

밑에 있는 form 안에 input type="hidden"넣고 위에 있는 form의 input 값을 밑에있는 input type=" hidden"에 값을 집어넣어 같이 insert를 하고 싶습니다. 제가 스크립트 쪽을 전혀 몰라서 혹시 아시는 분 계신가요....
 

 

<div id="container">

<article id="service">

<!-- 매입 상단 콘텐츠 { -->

<section id="service_purchase_top">

</section>

<!-- } 매입 상단 콘텐츠 -->

 

<div class="respon">

<!-- 기본상품정보 { -->

<section id="inputBox" class="mgt50">

<form name="" id="" action="" onsubmit="">

<h3>기본상품정보</h3>

<table class="amj_write_tbl">

<colgroup>

<col width="150" />

<col />

<col width="150" />

<col />

</colgroup>

<tbody>

<tr>

<th>상품명</th>

<td colspan="3">

<div class="search_box">

<div class="search_form"><pre></pre>

<input type="text" name="" id="pd_nm" class="search_input" placeholder="상품명" />

<button type="submit" onclick="" class="submitbox">검색</button>

</div>

</div>

<div class="product_box">

<div id="bm_product_list">

<ul class="floats">

<li>

<a href="#;">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product1.jpg');?>" alt="" /></span>

<span class="brand">[에르메스]</span>

<span class="tit">에르메스 가방 버킨백 TOGO 2016 파워에디션</span>

</a>

</li>

<!--

<li>

<a href="#;">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product2.jpg'); ?>" alt="" /></span>

<span class="brand">[프라다]</span>

<span class="tit">멋진 슈즈</span>

</a>

</li>

<li>

<a href="#;" class="active">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product3.jpg');?>" alt="" /></span>

<span class="brand">[에르메스]</span>

<span class="tit">에르메스 가방 버킨백 TOGO 2016 파워에디션</span>

</a>

</li>

<li>

<a href="#;">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product4.jpg'); ?>" alt="" /></span>

<span class="brand">[에르메스]</span>

<span class="tit">에르메스 가방 버킨백 TOGO 2016 파워에디션</span>

</a>

</li>

<li>

<a href="#;">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product1.jpg');?>" alt="" /></span>

<span class="brand">[에르메스]</span>

<span class="tit">에르메스 가방 버킨백 TOGO 2016 파워에디션</span>

</a>

</li>

<li>

<a href="#;">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product2.jpg');?>" alt="" /></span>

<span class="brand">[에르메스]</span>

<span class="tit">에르메스 가방 버킨백 TOGO 2016 파워에디션</span>

</a>

</li>

<li>

<a href="#;">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product3.jpg');?>" alt="" /></span>

<span class="brand">[에르메스]</span>

<span class="tit">에르메스 가방 버킨백 TOGO 2016 파워에디션</span>

</a>

</li>

<li>

<a href="#;">

<span class="pic"><img src="<?php echo base_url('assets/images/sample_product4.jpg');?>" alt="" /></span>

<span class="brand">[에르메스]</span>

<span class="tit">에르메스 가방 버킨백 TOGO 2016 파워에디션</span>

</a>

</li>

-->

</ul>

</div>

</div>

</td>

</tr>

<tr>

<th>구매시기</th>

<td>

<select class="write_select" name="">

<option value="">2016년</option>

<option value="">2015년</option>

<option value="">2013년</option>

<option value="">2012년</option>

<option value="">2011년</option>

<option value="">2010년</option>

<option value="">2009년</option>

<option value="">2008년</option>

<option value="">2007년</option>

<option value="">2006년</option>

<option value="">2005년</option>

<option value="">2004년</option>

<option value="">2003년</option>

<option value="">2002년</option>

<option value="">2001년</option>

<option value="">2000년</option>

</select>

<select class="write_select" name="">

<option value="">1월</option>

<option value="">2월</option>

<option value="">3월</option>

<option value="">4월</option>

<option value="">5월</option>

<option value="">6월</option>

<option value="">7월</option>

<option value="">8월</option>

<option value="">9월</option>

<option value="">10월</option>

<option value="">11월</option>

<option value="">12월</option>

</select>

</td>

<th>신품여부</th>

<td>

<label for="new"><input type="radio" value="Y" name="Newold" id="new" /> 새상품</label>   

<label for="old"><input type="radio" value="N" name="Newold" id="old" /> 중고</label>   

<select class="write_select">

<option value="">1월</option>

<option value="">2월</option>

<option value="">3월</option>

<option value="">4월</option>

<option value="">5월</option>

<option value="">6월</option>

<option value="">7월</option>

<option value="">8월</option>

<option value="">9월</option>

<option value="">10월</option>

<option value="">11월</option>

<option value="">12월</option>

</select>

</td>

</tr>

<tr>

<th>구성품</th>

<td colspan="3">

<textarea class="write_textarea" name="item_list" id="item_list"></textarea>

</td>

</tr>

</tbody>

</table>

</form>

</section>

<!-- } 기본상품정보 -->

 

<!-- 판매정보 { -->

 

<section id="inputBox" class="mgt50">

<?php

$attributes = array('class' => 'form-horizontal', 'name' => 'pur_write', 'id' => 'pur_write');

   echo form_open_multipart(current_full_url(), $attributes);

?>

<h3>판매정보</h3>

 

<input type="hidden" name="pd_nm" id="">

<input type="hidden" name="buy_dt_y" id="">

<input type="hidden" name="buy_dt_m" id="">

<input type="hidden" name="new_yn" id="">

<input type="hidden" name="new_yn" id="">

<input type="hidden" name="item_list" id="">

 

<table class="amj_write_tbl">

<colgroup>

<col width="150" />

<col />

</colgroup>

<tbody>

<tr>

<th>희망판매가</th>

<td><input type="text" name="wish_proce" id="wish_proce" class="write_input" /> 원</td>

</tr>

<tr>

<th>배송방법</th>

<td>

<label for="man1"><input type="radio" name="dl_cd" id="man1" /> 지점방문</label>   

<label for="man2"><input type="radio" name="dl_cd" id="man2" /> 택배</label>   

<label for="man3"><input type="radio" name="dl_cd" id="man3" /> 출장서비스</label>   

<label for="man4"><input type="radio" name="dl_cd" id="man4" /> 퀵</label>

</td>

</tr>

<tr>

<th>출장비용</th>

<td>20,000원</td>

</tr>

<tr>

<th>출장서비스</th>

<td>

<div class="tripbox">

<ul class="floats">

<li>

<input type="text" name="" class="write_input" /> <a href="#;" class="btns btnSmall btnType3">우편번호</a>

<input type="text" name="" class="write_input" placeholder="기본정보" style="width:100%" />

<input type="text" name="" class="write_input" placeholder="상세정보" style="width:100%" />

<div class="store">가까운 영업점 : <em>서울 강남구점</em></div>

</li>

<li>

<input type="text" name="" class="write_input" placeholder="연락처" style="width:100%" />

<input type="text" name="" class="write_input" placeholder="이메일" style="width:100%" />

<select class="write_select" name="" style="width:100%">

<option value="">예약시간 선택</option>

<option value="">1시</option>

<option value="">3월</option>

<option value="">4월</option>

</select>

</li>

<li>

<iframe src="https://www.google.com/maps/embed?pb=!1m26!1m12!1m3!1d101283.40651403306!2d126.95688097481103!3d37.50540732355606!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!4m11!3e6!4m3!3m2!1d37.512079799999995!2d127.02657549999999!4m5!1s0x357ca3e308c9cf9d%3A0xa16a7b1056165946!2z66eI7J207KmQ!3m2!1d37.505427999999995!2d127.02692099999999!5e0!3m2!1sko!2skr!4v1482113237490" width="340" height="130" frameborder="0" style="border:0" allowfullscreen></iframe>

</li>

</ul>

</div>

</td>

</tr>

<tr>

<th>상품소개 및<br />전달사항</th>

<td>

<textarea class="write_textarea" name="pd_info" id="pd_info"></textarea>

</td>

</tr>

<tr>

<th>첨부파일1</th>

<td>

<input type="file" class="write_file" name="file_nm1" id="file_nm1"/>

</td>

</tr>

<tr>

<th>첨부파일2</th>

<td>

<input type="file" class="write_file" name="file_nm2" id="file_nm2"/>

</td>

</tr>

</tbody>

</table>

</section>

<!-- } 판매정보 -->

 

<!-- 결제 { -->

<section id="inputBox" class="mgt50">

<h3>결제정보</h3>

<table class="amj_write_tbl">

<colgroup>

<col width="150" />

<col />

</colgroup>

<tbody>

<tr>

<th>총금액</th>

<td class="plusprice">출장비용 <em>20,000</em>원 + 감정비 <em>30,000</em>원 = <em class="colorRed">50,000</em>원</td>

</tr>

<tr>

<th>결제방법</th>

<td>

<label for="bank"><input type="radio" name="pay_kdn_cd" id="bank" /> 무통장입금</label>   

<label for="card"><input type="radio" name="pay_kdn_cd" id="card" /> 카드결제</label>   

<label for="phone"><input type="radio" name="pay_kdn_cd" id="phone" /> 휴대폰</label>

</td>

</tr>

</tbody>

</table>

</section>

<!-- } 결제 -->

 

<div class="btnarea mgt30">

<input type="submit" class="btns btnBig btnType1" value="신청하기" />

<!--<a href="#;" class="btns btnBig btnType1">신청하기</a>-->

</div>

 

</div>

</article>

</div>

 

<script type="text/javascript">

 

$('#fadminwrite').validate({

        rules: {

            wish_proce: {number: true},

            dl_cd: {required :true},

            branch_cd: {required :true },

            np_price: {number :true },

            save_amt: {number :true },

            pd_cnt: {number :true },

            pd_grade: {required :true },

            dl_sn: {required :true },

            pd_desc : {'required_smarteditor' : true }

        }

    });

 

 

</script>

이 질문에 댓글 쓰기 :

답변 1

질문이 이해되지 않아서 답이 안 달리는 것 같습니다.

검색어를 넣고 검색 버튼을 눌렀을 때 실행되는 파일에서 검색 결과를 표시해주기 전에 검색어를 저장하는 작업을 해주면 될 것 같아요.

답변을 작성하시기 전에 로그인 해주세요.
전체 123,622 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT