添加带有elseif $ row的按钮?

问题描述 投票:0回答:1

我需要放置一个表示“是”的按钮,但是我需要单击该按钮时将用户带到网页,这是供他们查看的php代码:

<table cellpadding="1" cellspacing="1" id="member">
    <thead>
        <tr>
            <th colspan="10">Players Not Activated</th>
        </tr>
        <tr>

            <td class="on">#</td>
            <td class="on">ID</td>
            <td class="on">Username</td>
            <td class="on">Email</td>
            <td class="on">Tribe</td>
            <td class="on">Activation Code</td>
            <td class="on">Act 2??</td>
            <td class="on">Time</td>
            <td class="on">PLAY</td>
        </tr>
    </thead>
    <tbody>
        <?php
            $sql = "SELECT * FROM ".TB_PREFIX."activate";
            $result = mysqli_query($GLOBALS["link"], $sql);
            while($row = mysqli_fetch_assoc($result))
            {
                $i++;
                if($row['tribe'] == 1) {$tribe = "Roman"; }
                elseif($row['tribe'] == 2) {$tribe = "Teuton"; }
                elseif($row['tribe'] == 3) {$tribe = "Gaul"; }

                echo "
                <tr>
                    <td>".$i."</td>
                    <td>".$row['id']."</td>
                    <td>".$row['username']."</td>
                    <td><a href=\"mailto:".$row['email']."\">".$row['email']."</a></td>
                    <td>".$tribe."</td>
                    <td>".$row['act']."</td>
                    <td>".$row['act2']."</td>
                    <td class=\"hab\">".date('d:m:Y H:i', $row['timestamp'])."</td>

                </tr>";
            }
        ?>
    </tbody>
</table>

我需要在显示“播放”的位置显示按钮

和我想要的目标网址是此链接:

<a href="activate.php?id=<?php echo $_GET['id']; ?>

我四天前已经尝试过使其能够正常工作,但是每当我修改文件时,都会收到一个空白的错误页面。

php button
1个回答
0
投票

是,激活码页面是这样:

© www.soinside.com 2019 - 2024. All rights reserved.