Hello, I’m new to the forums figured you guys could help with an issue I’m having.
Basically, put I’m using mysql to fetch games from my database and using the ID’s fetched to let them join the game provided they can.
The Problem is, When the table of games is retrieved, It will only allow the player to click the first button “join” and all the other buttons won’t work.
Here’s some code snippet.
[php]
<?php
echo $row[‘amount’];
?>
<?php
if ($userData[‘username’] != $row[‘player1’]) {
echo ’
<button type="button" id="join_game_submit" class="label label-success">Join </button>
<input type="hidden" id="join_id" name="join_id" value="' . $row['id'] . '" />
';
}
?>
<a style="margin-left: 5px" href="game.php?id=<?php echo $row['id'] ?>"><span class="label label-primary">
Watch
</span></a>
</form>[/php]
The button having the problem is the one named “Join”.