【发布时间】:2024-05-02 21:50:02
【问题描述】:
简而言之,我想从 URL 中获取 ID,将其保存到变量中并在通过 img 标签打开的 href 链接中表示它,所有这些都使用 PHP。
我的网址是:test.php?id=123
我想将ID保存到href中使用的变量ticket_dym_id中。
我的代码:
<?php
$id = $_GET['id'];
$ticket_dym_id = $id;
<html>
<title>title</title>
</html>
<center>
<a href="test2?id=<$ticket_dym_id>"><img="img.jpg"/></a>
</center>
?>
【问题讨论】: