将多个变量传递到 url 中的另一个页面
我正在使用这样的会话将一个变量传递到URL中的另一个页面,但似乎我无法将另一个变量连接到同一URL并在下一页中成功检索它
页码 1
session_start();
$event_id = $_SESSION['event_id'];
echo $event_id;
$url = "http://localhost/main.php?email=" . $email_address . $event_id;
页码 2
if (isset($_GET['event_id'])) {
$event_id = $_GET['event_id'];}
echo $event_id;
echo $event_id
在第2页上显示错误,但如果我在这里只使用喜欢Undefined variable
event_id
$url
$url = "http://localhost/main.php?event_id=" . $event_id;
这工作正常,但我需要能够在url中使用这两个变量,以便页面2可以检索它们。