目标:根据传递给 php 页面的 url 变量显示 4 个 Wistia 视频中的 1 个。
示例网址:
showvid.php?vid=1 or
showvid.php?vid=2 or
showvid.php?vid=3 or
showvid.php?vid=4
在 showvid.php 中:
一些 if/then 语句 where
if vid=1 then show wistia embed code 1
else
if vid=2 then show wistia embed code 2
else
if vid=3 then show wistia embed code 3
else
if vid=4 then show wistia embed code 4
很直接。如果在其他地方回答了这个问题,我深表歉意,我看了相当广泛,找不到可行的答案(而且我还很新,挖了一段时间后我的头在旋转)。
在此先感谢您的帮助。
编辑:从评论中提取代码
网址:pagename.php?bucket=1
$bucket = $_GET["bucket"]
if ($bucket == 1) {
$bucketdesc = 'Memory Vapor';
}
if ($bucket == 2) {
$bucketdesc = 'Brain Trauma Syndrome';
}
else {
goto "/pagetwo.php"
}