Search the Community
Showing results for tags 'same page'.
-
Hi again PhpFreaks, yet again I got a problem regarding coding. I want to build somewhat a score board, which shows the latest results of matches. I've build it so that it shows all the matches on my MySQL. $query = $pdo->prepare("SELECT * FROM results ORDER BY id DESC"); But i would like an option for my readers to choose a specific team, so that only matches of this specific team is shown. How would i be able to implement this feature without having to create a new page and stay on the same? Code of HTML <div class="results"> <table style="width:800px"> <?php foreach ($results as $result) { ?> <tr> <td style="background-color:grey;"><?php echo $result['date'] ?></td> <td ><?php echo $result['team1'] ?></td> <td style="background-color:green;"><?php echo $result['result1'] ?></td> <td><?php echo $result['team2'] ?></td> <td style="background-color:red;"><?php echo $result['result2'] ?></td> <td style="opacity: 0.5;"><?php echo $result['league'] ?></td> </tr> <?php } ?> </table> </div> Examples is more appreciated that explanations, I'm not that familiar with the english terms so makes it alittle harder for me to understand. Thanks alot in advance