通过链接传递多个变量(只读一个)

时间:2014-01-08 09:42:35

标签: php

我正在尝试从链接传递一些变量但由于某种原因它只读取其中一个。以下是链接和代码。 roundNo显示正常。

archery/viewround.php?gameNo=1&roundNo=7

    echo $_GET['gameNo'];
    echo $_GET['roundNo'];
  echo "<table border><tr><th>Round ID</th><th>Match Name</th><th>Player Name</th><th>Shot 1</th><th>Shot 2</th><th>Shot 3</th><th>Shot 4</th><th>Shot 5</th><th>Shot 6</th><th>Shot 7</th><th>Shot 8</th><th>Shot 9</th><th>Shot 10</th></tr>";
  while ($row = mysql_fetch_array($sql)) {
    $tempPlayerName = getnamewithid($row["player_id"]);
    $tempMatchName = getmatchnamewithid($_GET['gameNo']);
    echo "<tr>";
    echo '<td>' . $row["round_id"].'</td>';
    echo "<td>" . $tempMatchName. "</td>";
    echo "<td>" . $tempPlayerName. "</td>"; 
    echo "<td>" . $row["shot_1"] . "</td>";
    echo "<td>" . $row["shot_2"] . "</td>";
    echo "<td>" . $row["shot_3"] . "</td>";
    echo "<td>" . $row["shot_4"] . "</td>";
    echo "<td>" . $row["shot_5"] . "</td>";
    echo "<td>" . $row["shot_6"] . "</td>";
    echo "<td>" . $row["shot_7"] . "</td>";
    echo "<td>" . $row["shot_8"] . "</td>";
    echo "<td>" . $row["shot_9"] . "</td>";
    echo "<td>" . $row["shot_10"] . "</td>";
    echo "</tr>";
    $i++;
  }
  echo "</table>";

0 个答案:

没有答案