有人可以帮帮我吗?过去2小时我一直试图解决这个问题。这可能是一个小错误。无论如何,当点击提交按钮时,表单(命名为:registration)将不起作用。我已经尝试过登录表单重定向(在这种情况下隐藏)并且它可以工作,所以它不是服务器。它刚刚停止工作,我几乎没有改变 - 没有任何反应。
无论如何,这是我的代码,提前谢谢你。
第一档:
BEGIN
<foreach collection="cusHistory" item="history" separator="" >
INSERT INTO
CUS_ACTION_HISTORY_T(SEQ_NO, GLOBAL_ID, REQUEST_ID, CUS_ACTION_CODE, CUS_REQUEST_TIME, ENTITY_TYPE, ENTITY_KEY, PARENT_ENTITY_KEY,
DELTA_CHANGE, TOTAL_PROCESSING_TIME, TOTAL_SERVER_PROCESSING_TIME, USER_AN, UPDATE_MODE, TOTAL_TIME)
VALUES(
#{history.sequenceNo},
#{history.globalId},
#{history.requestId},
#{history.cusActionCode},
#{history.cusRequestTime},
#{history.entityType},
#{history.entityKey},
#{history.parentEntityKey},
#{history.deltaChange, jdbcType=CLOB},
#{history.totalProcessingTime},
#{history.totalServerProcessingTime},
#{history.userAn},
#{history.updateMode},
#{history.totalTime});
</foreach>
END;
第二档:
<!--\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Membership Form \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --->
<div class="container-fluid even" id="membership_form" data-aos="fade-up" data-aos-once="true">
<div class="container">
<br>
<br>
<h2 class="text-center">Memberhip Form</h2>
<div class="underline mx-auto rounded" data-aos="fade-up" data-aos-once="true"></div>
<p class="text-center" data-aos="fade-up" data-aos-once="true">Please fill out the following form to join the club!</p>
<br>
<form name="registration" action="registration.php" method="POST">
<div class="form-group">
<label for="name"><b>Name:</b></label>
<input type="text" class="form-control" name="name" id="name" placeholder="Please enter your first name" required>
</div>
<div class="form-group">
<label for="surname"><b>Surname:</b></label>
<input type="text" class="form-control" name="surname" id="surname" placeholder="Please enter your surname" required>
</div>
<div class="form-group">
<label for="email"><b>Email:</b></label>
<input type="email" class="form-control" name="email" id="email" placeholder="example@domain.com" required>
</div>
<div class="form-group">
<label for="address1"><b>Address Line 1:</b></label>
<input type="text" class="form-control" name="address1" id="address1" placeholder="Enter adress line 1" required>
</div>
<div class="form-group">
<label for="address2"><b>Address Line 2:</b></label>
<input type="text" class="form-control" name="address2" id="address2" placeholder="Enter adress line 2" required>
</div>
<div class="form-group">
<label for="address3"><b>Address Line 3:</b></label>
<input type="text" class="form-control" name="address3" id="address3" placeholder="Enter adress line 3" required>
</div>
<div class="form-group">
<label for="address4"><b>Address Line 4:</b></label>
<input type="text" class="form-control" name="address4" id="address4" placeholder="Enter adress line 4">
</div>
<div class="form-group">
<label for="eircode"><b>Eircode:</b></label>
<input type="text" class="form-control" name="eircode" pattern="(D|d)[1-9](W|w)?\s?[A-Za-z]{2,}\d{2,}|(D|d)1[1-9]\s?[A-Za-z]{2,}\d{2,}|(D|d)2[0-4]\s?[A-Za-z]{2,}\d{2,}" id="eircode" placeholder="eg. D17AG45">
</div>
<div class="form-group">
<label for="mobile"><b>Mobile:</b></label>
<input type="text" class="form-control" name="mobile" pattern="\+\d{3}-\d{3}-\d{4}|00\d{3}-\d{3}-\d{4}|08\d-\d{3}-\d{4}|\+\d{10}|00\d{10}|08\d{8}" id="mobile" placeholder="eg: 0894576345" required>
</div>
<div class="form-group">
<label for="dob"><b>Date Of Birth:</b></label>
<input type="date" class="form-control" name="dob" id="dob" required>
</div>
<br>
<label for="gender_radio"><b>Gender:</b></label>
<div class="radio">
<input type="radio" name="gender_radio" value="m" checked> Male<br>
<input type="radio" name="gender_radio" value="f"> Female
</div>
<br>
<label for="membership_radio"><b>Membership:</b></label>
<div class="radio">
<input type="radio" name="membership_radio" value="s" checked> Summer (€50/month)<br>
<input type="radio" name="membership_radio" value="w"> Winter (€40/month)<br>
<input type="radio" name="membership_radio" value="y"> Yearly (€30/month)<br>
</div>
<br>
<div class="form-group">
<label for="start_date"><b>Start Date:</b></label>
<input type="date" class="form-control" name="start_date" id="start_date" min="<?php echo date('Y\-m\-d');?>" required>
</div>
<br>
<label for="family_radio"><b>Do you have a family member already registered:</b></label>
<div class="radio">
<input type="radio" name="family_radio" value="true"> Yes</br>
<input type="radio" name="family_radio" value="false" checked> No
</div>
<br>
<div class="form-group" id="answer">
<label for="family_head"><b>If you answered yes to the above question, please enter your family member's membership number:</b></label>
<input type="number" class="form-control" name="family_head" id="family_head" placeholder="eg: 234531" required>
</div>
<br>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<br>
<br>
</div>
<!--\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Footer \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --->
<?php require_once('footer_n_scripts.php'); ?>
</body>
</html>
<?php
if($_SERVER['REQUEST_METHOD'] != 'POST') header('Location: memberships.php#membership_form');
else{
require '../../db_connection_open.php';
mysqli_select_db($db_connection, 'sintonidb');
}
function upper_case_by_space_n_hyphen($str){
$str = explode(' ', $str);
foreach($str as $key => $value){
$str[$key] = ucfirst($value);
}
$str = implode(' ', $str);
$str = explode('-', $str);
foreach($str as $key => $value){
$str[$key] = ucfirst($value);
}
$str = implode('-', $str);
return $str;
}
?>
答案 0 :(得分:0)
发现错误,最后一项输入被隐藏,也是必需的。