Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何从上一页获取ID值并将其插入下一页_Php - Fatal编程技术网

Php 如何从上一页获取ID值并将其插入下一页

Php 如何从上一页获取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

我正在尝试将定位器添加到帐户持有人AddLocator.php上的图像就是帐户持有人。 链接addlocator将用户重定向到AddLocatorProcess.php。我需要的是获取帐户持有人的ID,将其作为外键插入新创建的定位器中。 我该怎么做

AddLocator.php

AddLocatorProcess.php

制作
添加定位器
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?>