如何在提交当前页面中的提交按钮后创建将在上一页中禁用的提交按钮?

I have this main page where user enters date and goes to second page, The user enters the date and click submit, once I click submit,the form is submitted and in the previous page(which is the main page) the submit button is disabled.

How to create a submit button that will disable in previous page after the submit button in current page is submitted?

below is code for test2.php

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
    <link rel="stylesheet" type="text/css" href="print.css" media="print" />
<title></title>
</head>

<body>
<header><h4>Customer Purchase Order</h4></header>
<form action="test3.php" method="post">
<table style="border-collapse:collapse;" width="500" height="206" border="1">
        Date:&nbsp;&nbsp;<input type="text" name="sdate" placeholder="yyyy-mm-dd">&nbsp;&nbsp;
        <input type="submit" name="save" value="Save" onclick="myFunction()"><br><br>

<script>
function myFunction() {
    document.getElementById("mySubmit").disabled = true;
}
</script>
</table>
</form>
</body>
</html>

this is code for test3.php

<!DOCTYPE html>
<html>
<body>

<a href="test2.php">Back</a>

</body>
</html>

</div>