我可以轻松地在html中添加href链接以重定向到另一个页面,但是单击按钮时链接到另一个页面的PHP代码是什么?
page1.php
<div class="col-md-4 col-md-offset-8">
<input type="submit" class="btn bg-color-dark-gold color-white form-control" name="submit" value="SAVE">
</div>
page2.php
if (isset($_POST['submit']) && $_POST['submit'] == 'SAVE')
{
$leaseid = $_GET['i'];
$lease_name = $_POST['lease_name'];
$lease_type = $_POST['lease_type'];
$lease_address = $_POST['lease_address'];
$lease_price = $_POST['lease_price'];
$lease_condition = $_POST['lease_condition'];
$lease_description = $_POST['lease_description'];
$mcProperty->UpdateLease($db, $leaseid, $lease_type, $lease_name, $lease_address, $lease_price, $lease_condition, $lease_description);
}
我想在page2.php中添加一些内容,当单击按钮并在更新SQL之后返回到page1.php。