Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $network = $_GET['network_name'];
- $conn = new PDO('mysql:host=sql.computerstudi.es;dbname=gc200339389', 'gc200339389', 'dFqU^s25');
- $sql = "SELECT * FROM 'shows' WHERE network_name = :network_name";
- $cmd->execute([":network_name" => $network]);
- $cmd = $conn->prepare($sql);
- $cmd-> execute();
- $shows = $cmd->fetchAll();
- echo '<table class="table table-striped"><thead><th>Show Name</th><th>First Year</th><th>Network Name</th></thead><tbody>';
- foreach ($shows as $show) {
- echo '<tr><td>' . $show['show_name'] . '</td>
- <td>' . $show['first_year'] . '</td>
- <td>' . $show['network_name'] . '</td>
- </td></tr>';
- }
- echo '</tbody></table>';
- //7. disconnect
- $conn = null;
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement