Php 如何从上一页获取ID值并将其插入下一页
我正在尝试将定位器添加到帐户持有人中AddLocator.php上的图像就是帐户持有人。 链接addlocator将用户重定向到AddLocatorProcess.php。我需要的是获取帐户持有人的ID,将其作为外键插入新创建的定位器中。 我该怎么做 AddLocator.php AddLocatorProcess.phpPhp 如何从上一页获取ID值并将其插入下一页,php,Php,我正在尝试将定位器添加到帐户持有人中AddLocator.php上的图像就是帐户持有人。 链接addlocator将用户重定向到AddLocatorProcess.php。我需要的是获取帐户持有人的ID,将其作为外键插入新创建的定位器中。 我该怎么做 AddLocator.php AddLocatorProcess.php 制作添加定位器href,使其在URL中包含ID,如下所示: <a href="AddLocatorProcess.php?id=<ID_TO_BE_SENT_O
制作
添加定位器
href,使其在URL中包含ID,如下所示:
<a href="AddLocatorProcess.php?id=<ID_TO_BE_SENT_ON_NEXT_PAGE>">Add Locator</a>
然后在AddLocatorProcess.php页面中,您可以通过以下方式获得该ID:
<?php echo $_GET['id']; //this will give the id of clicked locator to be used as foreign key?>