想我嘗試獲取先前的$變量(register_detail.php)至$ _ POST(register_submit.php)
例如:
register_detail.php
<form action="register_submit.php" method='POST'>
<table>
<tr><td>Name:</td> <td><?php print ($name); ?></td></tr>
<tr><td>I/C:</td> <td><?php print ($ic); ?></td></tr>
<tr><td>e-mail:</td> <td><?php print ($email); ?></td></tr>
<tr><td>Address:</td> <td><?php print ($address); ?></td></tr>
<tr><td>Date of Birth:</td> <td><?php print ($dob); ?></td></tr>
<tr><td>Contact:</td> <td><?php print ($contact); ?></td></tr>
</table>
<?php $password; ?> -- this was not meant to be displayed --
<input type='submit' name='submit' value='Confirm'><input type='button' value='Cancel' onclick='history.go(-1);return false;'/>
</form>
到新的PHP(register_submit.php)
if (isset($_POST['name']) && isset($_POST['ic']) && isset($_POST['email']) && isset($_POST['address']) && isset($_POST['dob']) && isset($_POST['contact']) && isset($_POST['password']))
$name = $_POST['name'];
$ic = $_POST['ic'];
$email = $_POST['email'];
$address = $_POST['address'];
$dob = $_POST['dob'];
$contact = $_POST['contact'];
$password = $_POST['password'];
正如我們所看到的,我可以賣到$變量$ _ POST?
將舊值的形式隱藏的輸入,你可以在形式,許多隱藏的變數。 – Barmar
我該怎麼做?在標記? –
如果你不想被顯示!使用'cookie'或'session' – senK