如何创建一个链接,将用户发送到另一个页面,然后转到另一个与链接相关的页面? [英] How do I create a link that sends the user to another page which is then diverted to another page associated with the link?

查看:125
本文介绍了如何创建一个链接,将用户发送到另一个页面,然后转到另一个与链接相关的页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何创建一个链接,将用户发送到另一个页面,然后转到另一个与链接相关的页面?

How do I create a link that sends the user to another page which is then diverted to another page associated with the link?

我想创建一个列表的HTML URLs,当它们中的任何一个被点击时,它将用户发送到中间页面,询问用户他们是否同意条款和条件。如果他们这样做,他们会转到与他们点击的链接对应的页面。与此图相似。

I would like to create a list of html URLS that as any one of them is clicked, it sends the user to an intermediary page, which asks the user whether they agree to the terms and conditions. If they do they are diverted to that page corresponding to that link they clicked. Similary to this diagram.

Link 1 ==> Intermediary Page ==> Page 1,
Link 2 ==> Intermediary Page ==> Page 2,
Link 3 ==> Intermediary Page ==> Page 3,
Link 4 ==> Intermediary Page ==> Page 4,
Link 5 ==> Intermediary Page ==> Page 5

我不知道它调用的是哪个进程。我打算使用HTML和PHP。

I do not know what process it called. I intend to use HTML and PHP.

推荐答案

第一个HTML页面

<a href="intermediary.php?q=1">Link 1</a>
<a href="intermediary.php?q=2">Link 2</a>
<a href="intermediary.php?q=3">Link 3</a>
<a href="intermediary.php?q=4">Link 4</a>
<a href="intermediary.php?q=5">Link 5</a>

intermediary.php

intermediary.php

<?php
$link = (int)$_GET["q"];
?>
<a href="page<?=$link?>.html">I agree to the terms and conditions</a>

这篇关于如何创建一个链接,将用户发送到另一个页面,然后转到另一个与链接相关的页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆