返回mySQL查询id'查询isset($_POST['$'])


return mySQL query 'id' for an isset($_POST['$'])

以下代码列出了用户可以接受并相互下注的available matches。此时此刻,我一次只能列出一个匹配项。

    $query = mysql_query("SELECT `create_id` ,`value`, `player1`, `match_id` FROM `multiplayer` WHERE `complete` = 0 ORDER BY `value` DESC LIMIT 1");
echo '<table>';
while($rowtwo = mysql_fetch_array($query)){
    $format_coins = number_format($rowtwo['value']);
    $value = $rowtwo['value'];
    $create_player = $rowtwo['player1'];
    $echo = $rowtwo['match_id'];
    $create_id = $rowtwo['create_id'];
    $button =   '
                <form action="multiplayer.php" method="POST">
                <input type="submit" name="'.$echo.'" value="Accept">
                </form>                 
                ';
    //$button = '<a href="match/'.$echo.'.php">Accept</a>';
    echo   '<tr>
            <td><font size="2" face="Lucida Sans Unicode"><strong>'.$rowtwo['player1'].'</strong> has wagered '.$format_coins.'M/Gp'.$button.'</td>
            </tr>';}
echo '</table>';

现在我需要将DESC LIMIT 1更改为DESC LIMIT 10左右,但是当我一次添加多个清单时,下面的代码无法拾取它。它只挑选列出的一个。

    if (isset($_POST[''.$echo.''])) {
    if ($user_data['coins'] >= $value) {
        if ($user_data['user_id'] == $create_id) {
            echo 'You can''t play yourself.';
        } else {    

我需要它,以便它能够从那个按钮拾取match_id。如果我将按钮值设置为$echo,它会拾取匹配ID,但似乎我的问题在于我的isset($_POST[''.$echo.'']),有人能帮助吗?

我通过添加我的

修复了这个问题
if (isset($_POST[''.$echo.''])) {

进入列出可用matches的while循环