1 페이지의 다음 정보를 2 페이지의 숨김 파일로 전달해야합니다. 추가 정보가 2 페이지에 추가되고 모든 입력 필드가 3 페이지에 표시되어야합니까?1 페이지의 입력 필드를 2 페이지의 숨겨진 필드로 전달한 다음 페이지 2에서 숨겨진 필드를 자바 스크립트에서 표시하려면 어떻게해야합니까?
form method="POST" action="confirm.php" onsubmit="return checkForm(this);">
<p><label>Interest:</label></p>
<input type="checkbox" name="fund" value="fund"/><span>Fund Raising</span>
<input type="checkbox" name="sponsor" value="sponsor" /><span>Sponsorship</span>
<input type="checkbox" name="vol" value="vol" /><span>Volunteer</span><div></div>
<p><label for="signUpNewsletter">Sign up for newsletter:
</label></p>
<input type="radio" name="signUpNewsletter" value="Yes"> Yes
<input type="radio" name="signUpNewsletter" value="No"> No
<p><label for="desc">Comments:</label></p>
<textarea name="desc" id="desc" rows="10" cols="30"></textarea>
<p><label for="referred"> Referred by:</label></p>
<input type="text" name="referred" />
<?php
if(isset($_POST["submit"]))
{
$username= $_POST["username"];
$pwd1= $_POST["pwd1"];
}
?>
<input type="hidden" name="username" value="<?php echo $_POST["username"]; ?>">
<input type="hidden" name="pwd1" value="<?php echo $_POST["pwd1"]; ?>">
<input type="hidden" name="pwd2" value="<?php $_POST["pwd2"]; ?>">
<input type="hidden" name="firstName" value="<?php echo $_POST["firstName"]; ?>">
<input type="hidden" name="lastName" value="<?php echo $_POST["lastName"]; ?>">
<input type="hidden" name="email" value="<?php echo $_POST["email"]; ?>">
<input type="hidden" name="phone" value="<?php echo $_POST["phone"]; ?>">
<input type="hidden" name="fund" value="<?php echo $_POST["fund"]; ?>">
<input type="hidden" name="sponsor" value="<?php echo $_POST["sponsor"]; ?>">
<input type="hidden" name="vol" value="<?php echo $_POST["vol"]; ?>">
<input type="hidden" name="sign" value="<?php echo $_POST["sign"]; ?>">
<input type="submit" name="submit1" value="Register">
</form>
페이지를도 2 페이지로 페이지 (1)로부터 입력되는 정보를 표시하는 3 개 요구 :
<section id="pageFormContent">
<p>You have successfully registered!</p>
<?php
if(isset($_POST["submit1"]))
{
$username= $_POST["username"];
$pwd1= $_POST["pwd1"];
$pwd2= $_POST["pwd2"];
$firstName= $_POST["firstName"];
$lastName= $_POST["lastName"];
$email= $_POST["email"];
$phone= $_POST["phone"];
$fund= $_POST["fund"];
$sponsor= $_POST["sponsor"];
$vol= $_POST["vol"];
$sign= $_POST["sign"];
echo $username;
echo $pwd1;
echo $pwd2;
echo $firstName;
echo $lastName;
echo $email;
echo $phone;
echo $fund;
echo $sponsor;
echo $vol;
echo $sign;
}
?>
</section>
2는 다음
<form method="POST" action="interests.php" onsubmit="return checkForm(this);">
<p>Use tab key to move from one input field to the next.</p>
<label for="userName">Username:</label>
<input type="text" name="username" placeholder="Enter your Username" /><div><span id='errorusername'></span></div>
<label for="passWord1">Password:</label>
<input type="password" name="pwd1" placeholder="Enter your Password" /><div><span id='errorpwd1'></span></div>
<label for="passwordword2">Verify your Password:
</label>
<input type="password" name="pwd2" placeholder="Enter in your Password again" /><div><span id='errorpwd2'></span></div>
<label for="firstName">First Name:
</label>
<input type="text" name="firstName" placeholder="Enter your First Name" /><div><span id='errorfirstName'></span></div>
<label for="lastName">Last Name:
</label>
<input type="text" name="lastName" placeholder="Enter your Last Name" /><div><span id='errorlastName'></span></div>
<label for="email">Email:
</label>
<input type="text" name="email" placeholder="Enter your Email Address" /><div><span id='erroremail'></span></div>
<label for="phone">Phone Number
</label>
<input type="text" name="phone" placeholder="Enter your Phone Number" /><div><span id='errorphone'></span></div>
<input type="submit" name="submit" value="Next Step">
</form>
페이지 : 1 페이지 registration.html 이하
제출 버튼을 누르면 표시되는 것은 "You have successfully registered!"입니다. 데이터가 표시되지 않는 이유는 누구에게 말해 줄 수 있습니까?
페이지에서
변경이되었고, 그래도 코드가 세 번째 페이지에 정보를 표시하는 작동하지 않습니다. 다른 제안을? – John