HY。我在PHP中有这段代码
$venue=filter_input(INPUT_POST, 'venue');
$firstName = filter_input(INPUT_POST, 'firstName');
$lastName = filter_input(INPUT_POST, 'lastName');
$dateofBirth=filter_input(INPUT_POST, 'dateofBirth');
$gender=filter_input(INPUT_POST, 'gender');
$country=filter_input(INPUT_POST, 'country');
$email = filter_input(INPUT_POST, 'email');
$phone= filter_input(INPUT_POST, 'phone');
$address=filter_input(INPUT_POST, 'address');
$englishLevel=filter_input(INPUT_POST, 'englishLevel');
$profession=filter_input(INPUT_POST, 'profession');
$remarks=filter_input(INPUT_POST, 'remarks');
$first_name = filter_input(INPUT_POST, 'first_name');
$last_name = filter_input(INPUT_POST, 'last_name');
$dateof_birth=filter_input(INPUT_POST, 'dateof_birth');
$placeof_birth=filter_input(INPUT_POST, 'placeof_birth');
$nationality=filter_input(INPUT_POST, 'nationality');
$passaport=filter_input(INPUT_POST, 'passaport');
$dateofIssue=filter_input(INPUT_POST, 'dateofIssue');
$placeofIssue=filter_input(INPUT_POST, 'placeofIssue');
$dateofExpiry=filter_input(INPUT_POST, 'dateofExpiry');
$residence_address=filter_input(INPUT_POST, 'residence_address');
$occupation=filter_input(INPUT_POST, 'occupation');
$addressOfEmployer=filter_input(INPUT_POST, 'addressOfEmployer');
if(isset($_POST['venue'])){
//$radio_input = $_POST['radio'];
$data = "Venue & Date: " . $venue . "\n".
"Name: " . $firstName . ' ' . $lastName . "\n" .
"Date of birth: " .$dateofBirth . "\n".
"Gender: " .$gender . "\n".
"Country: " . $country . "\n" .
"Email: " . $email. "\n" .
"Phone: " .$phone . "\n".
"Address: " .$address . "\n" .
"Level of English: " .$englishLevel . "\n" .
"Occupation or profession: " .$profession . "\n" .
"Other remarks or questions: " .$remarks . "\n";
}
if ( $_POST['yesno'] == 'yes') {
$data = "Name: " . $first_name . ' ' . $last_name . "\n" .
"Date of birth: " .$dateof_birth . "\n" .
"Place of birth: " .$placeof_birth . "\n" .
"Nationality: " .$nationality . "\n" .
"Passaport: " .$passaport . "\n" .
"Date of issue: " .$dateofIssue . "\n" .
"Place of issue: " .$placeofIssue . "\n" .
"Date of expiry:" .$dateofExpiry . "\n" .
"Residence address: " .$residence_address . "\n" .
"Profession: " .$occupation . "\n" .
"Address of employer: " .$addressOfEmployer . "\n" ;
}
我的条件是:如果您需要签证,请选择是,然后出现另一个表格,然后您应该填写所有字段 我收到了邮件,但是当我完成并且#34; VISA"我只收到第二种形式的字段。我做错了什么?
更新:这是H
的一部分<div class="form-group">
<div class="col-sm-6 padding-top-10">
<label for="englishLevel" class="control-label">Level of English(bad, medium, good, excellent):</label>
<input type="text" class="form-control" name="englishLevel" required data-parsley-pattern="^[a-zA-Z ]+$" id="englishLevel" placeholder="your english level" />
</div>
<div class="col-sm-6 padding-top-10">
<label for="occupation" class="control-label">Occupation or profession:</label>
<input type="text" class="form-control" name="profession" required data-parsley-pattern="^[a-zA-Z ]+$" id="profession" placeholder="your profession" />
</div>
</div>
<label for="remarks" class="control-label padding-top-10">Other remarks or questions:</label>
<div class="form-group">
<div class="col-sm-12">
<input type="text" class="form-control" name="remarks" id="remarks" placeholder="remarks or questions" />
</div>
</div>
<div class="col-sm-12 padding-top-10">
<label for="visa" class="control-label padding-top-10">Do you need a visa to come to course venue?</label>
<label class="radio-inline">
<input type="radio" onclick="javascript:yesnoCheck();" name="yesno" id="yesCheck" value="yes" /> YES
</label>
<label class="radio-inline">
<input type="radio" onclick="javascript:yesnoCheck();" name="yesno" id="noCheck" value="no" checked="checked" /> NO
</label>
</div>
<div id="ifYes" style="display:none">
<div class="col-sm-12 padding-top-10">
<h1 span style="color:red">If you need visa, please complete the following data:</h1>
<br>
</div>
<label for="firstName" class="control-label">Full name(as written in the passaport):</label>
<div class="form-group">
<div class="col-sm-6 padding-top-10">
<input type="text" class="form-control" name="first_name" data-parsley-pattern="^[a-zA-Z ]+$" id="first_name" placeholder="First" />
</div>
<div class="col-sm-6 padding-top-10">
<input type="text" class="form-control" name="last_name" data-parsley-pattern="^[a-zA-Z ]+$" id="last_name" placeholder="Last" />
</div>
</div>
<div class="form-group">
<div class="col-sm-4 padding-top-10">
<label for="dateofBirth" class="control-label">Date of birth:</label>
<input type="text" class="form-control" name="dateof_birth" data-parsley-trigger="keyup" data-parsley-pattern="/^(\d{1,2})(\/|.)?(\d{1,2})(\/|.)?(\d{4})$/" placeholder="MM.DD.YYYY" data-date-format="MM.DD.YYYY" id="dateof_birth" />
</div>
<div class="col-sm-4 padding-top-10">
<label for="placeofBirth" class="control-label">Place of birth:</label>
<input type="text" class="form-control" name="placeof_birth" data-parsley-pattern="^[a-zA-Z ]+$" id="placeof_birth" placeholder="your place of birth" />
</div>
<div class="col-sm-4 padding-top-10">
<label for="nationality" class="control-label">Nationality:</label>
<input type="text" class="form-control" name="nationality" data-parsley-pattern="^[a-zA-Z ]+$" id="nationality" placeholder="your nationality" />
</div>
</div>