0
<?php
$result_username=mysqli_query($dbc, $query_fetch_username);
if(mysqli_num_rows($result_username)){
echo "There is already a user with that username!";
return;
}
//Section of php code that echo the request;
?>
<script>
function processBack(x){
_("phase1").style.display="block";
_("show_all_data").style.display="none";
_("progressBar").value=0;
_("status").innerHTML="Applicant's Information";
}
//That's the code for the back button;
</script>
<script>
$(function(){
$(document).on("click", ".reg", function(e) {
e.preventDefault();
{
//This is the ajax that will capture all the inputs from the form
var infom = $("#msform").serialize();
//$("#showresult").addClass('loader');
$.ajax({
beforeSend: function() { },
type: "POST",
url: "http://localhost/registration_sub.php",
data:infom,
success: function(result){
//$("#showresult").removeClass('loader');
$('#showresult').html(result);
}
});
e.preventDefault();
}
});
});
</script>
我有一些PHP & JavaScript代碼我創建的具有兩個步驟第一步和第二步的多相形式。 如果我輸入了錯誤的內容或將輸入字段留空,它會在第2步中顯示錯誤消息否當我按回並更正該問題,然後選擇下一個時,它會一直顯示相同的消息。如果我選擇回並更正問題,然後按下一步如何清除消息?多相形式釋放PHP的回送消息時回壓