여기에서 나를 수정하십시오.PHP 멀티 페이지 입력 값 세션 변수 print
나는 각 페이지의 데이터를 최종 페이지로 전달한 후 전자 메일로 제출하려는 다중 페이지 양식을 만들었습니다. 첫 번째는 apply.php이고, 많은 입력 필드가 있지만, 일부는 여권 필드에 여권 번호를 입력 할 때 여기에 나열되어 있습니다.이 필드는 영원히 통과해야하며, 몇 자리에 인쇄해야합니다. 각 페이지. 여기에 일부 필드를 통과 할 때 몇 가지 문제가 있습니다.
이는 첫 페이지 (apply.php)
<?php
// Start the session
session_start();
?>
<form name="search_form" method="post" onSubmit="return chk();" action="apply2.php">
<input name="passportno" id="passportno" type="text" maxlength="20" placeholder="Enter Passport No." size="43" >
<input name="birthdate" type="date" class="textBoxDashed" size="43" id="birthdate" datepicker="true" datepicker_min="01/01/1900" datepicker_max="21/11/2017" maxlength="10" datepicker_format="DD/MM/YYYY" isdatepicker="true" value="">
<input name="button1" type="submit" value="Continue">
이 apply2.php이다. 여기 몇 가지 문제가 있습니다, 내가 찾을 수 없습니다, 당신이 코드를 볼 수 있듯이, 나는 출생의 날짜를 인쇄 할 수 있지만 여권 (form1에서 입력)을 인쇄 할 수 없습니다. 여기서 내가 틀린 곳을 수정하십시오.
<?php
session_start();
$msg="";
////include("connect.php");
if (isset($_POST['button1']))
{
extract($_POST);
$code=strtolower($_POST['captcha_code']);
$sess=strtolower($_SESSION["code"]);
if ($sess==$code)
{
$appid=time().rand();
$result=mysqli_query($con,"select *from registration where email='$email'");
if (mysqli_fetch_row($result)>0)
{
?>
<script>
alert("This email is already exist");
</script>
<?php
}
else
{
$query="insert into registration values('$appid','$passportno','$birthdate','$email')";
if (mysqli_query($con,$query))
$msg="Data saved Successfully.Please note down the Temporary Application ID $appid";
else
echo "not inserted".mysqli_error($con);
if (!isset($_SESSION["appid"]))
{
$_SESSION["appid"]=$appid;
}
}
}
else
{
?>
<?php
}
}
?>
<form name="OnlineForm" method="post" onsubmit="return OnSubmitForm();" action="apply3.php">
<input name="applid" id="applid" value="<?php echo $_SESSION["appid"];?>">
<input type="hidden" name="birthdate" value="<?php echo $birthdate;?>"><b><?php echo $birthdate;?>
<input name="passportno" type="text" class="textBoxDashed" id="passportno" value="" size="43" maxlength="14" value="<?php echo $passportno;?>">
input name="sc" type="submit" class="btn btn-primary" id="continue" value="Save and Continue" onclick="document.pressed=this.name">