좋은 하루 모두에 제출 방지 및 난 아직도 포스트를 통해 양식을 제출하면더블 <p></p> 내가 질문 나는 모든 곳에서 그것을 보았다, 데이터베이스
붙어 것 -> 변수 -> 데이터베이스 후 리디렉션 이 리디렉션하는 데 걸리는 시간 header(location:page.php);
과 데이터베이스에 여전히 중복 된 데이터를 삽입 버튼을 제출에 내가
클릭을 사용하여 다른
페이지
어떻게 그런 일이 발생하지 않도록 할 수 있습니까? 나는 토큰에 읽을 수 있지만 나는 그것이
다른 페이지 내 양식 데이터를 처리하지 않고 어떻게 작동하는지 볼 수 없습니다 내가
로하지 않는 한 그 어떤 도움 바랍니다 할 ??
HTML 아래 참조하십시오
<form name="frmall"class="col s12" action="" method="post">
<!--basic info------------------------------------------------------------------------------------------------------------->
<div class="divider"></div>
<div class="section">
<h5>Basic Member Information</h5>
<div class="row">
<div class="input-field col s6">
<input id="first_name" name="txt_name" type="text" class="validate" value="<?php if(isset($_POST['btnContinue'])){echo $_POST['txt_name']; } ?>">
<label for="first_name">First Name</label>
</div>
<div class="input-field col s6">
<input id="last_name" type="text" name="txt_surname" class="validate"value="<?php if(isset($_POST['btnContinue'])){echo $_POST['txt_surname']; } ?>">
<label for="last_name">Last Name</label>
</div>
<div class="input-field col s6">
<input id="icon_telephone" type="tel" name="txt_number" class="validate"value="<?php if(isset($_POST['btnContinue'])){echo $_POST['txt_number']; } ?>">
<label>Telephone</label>
</div>
<div class="input-field col s6">
<input id="email" type="email" name="txt_email" class="validate"value="<?php if(isset($_POST['btnContinue'])){echo $_POST['txt_email']; } ?>">
<label for="email" data-error="wrong" data-success="right">Email</label>
</div>
<div class="input-field col s6">
<input id="idnumber" type="text" name ="txt_idnumber" class="validate"value="<?php if(isset($_POST['btnContinue'])){echo $_POST['txt_idnumber']; } ?>">
<label>ID Number</label>
</div>
</div>
<button class="btn waves-effect waves-light" type="submit" name="btnCancel">Cancel</button>
<button class="btn waves-effect waves-light" type="submit" name="btnContinue">Continue</button>
</div>
</Form>
PHP를 (제발하지 그 단지 예를 들어 EN) :
if (isset($_POST['btnContinue'])) {
$Conn->insert_main_member($name, $surname, $number, $idnumber, $email);
header(location:page.php);
}
어떻게 내가 두 번 방지 버튼을 해제하지 않고 제출하나요?
는 단순히 POST 변수 후 나는'사용 $ _POST = 배열 () 데이터 – Karthi
를 삽입 취소하려고,'단지 옆에 유효한 데이터 제출 후 제출 버튼을 당신은 숨길 수 – Christiaan
는 다음 코드를 게시 제대로 작동 나던 데이터 중복을 방지하기 위해 ... – Karthi