Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * User: Kevin
- * Date: 20/2/2018
- * Time: 1:44 PM
- * Bestand: .php
- */
- include ("functions.php");
- $query = " SELECT * From Optreden WHERE username = ". $_GET[' username'] .";";
- // Starten van een database connectie
- startConnection();
- // Executeren van een SQL query
- $query = "SELECT * FROM mojo";
- if (isset($_GET["zoekwoord"]) == true)
- {
- $woord = $_GET["zoekwoord"];
- $query = "SELECT * FROM Organizators WHERE userName LIKE '%$woord%'";
- }
- else
- {
- $query = "SELECT * FROM Organizators";
- }
- $jokes = executeQuery($query);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>
- <?php echo "Template" ?>
- </title>
- <meta name="description" content="Template">
- <meta name="keywords" content="Teamplate">
- <meta charset="utf-8">
- <link rel="stylesheet" type="text/css" href="../../../css/style.css">
- </head>
- <body>
- <form action="Opdracht%207.3.php" method="get" id="wrapper">
- <?php
- include ("../../../Hoofdstuk 4/Opdracht 4.1/header.php");
- ?>
- <p><?php echo $query ?></p>
- Zoekterm: <input type="text" name="zoekwoord"><button>Zoeken</button>
- <table>
- <tr>
- <th>
- Jokeid
- </th>
- <th>
- Joketext
- </th>
- <th>
- Jokeclou
- </th>
- <th>
- Jokedate
- </th>
- </tr>
- <?php
- while ($row = $jokes->fetch(PDO::FETCH_ASSOC))
- {
- // Result wegschrijven in de $aJokes array
- echo "<tr>";
- echo "<td><a href='template.php?gebruikersnaam=". $row["userName"]. "'>" . $row["userName"] . "</a></td>";
- echo "<td>" . $row["userPassword"] . "</td>";
- echo "</tr>";
- }
- ?>
- </table>
- <?php
- include ("../../../Hoofdstuk 4/Opdracht 4.1/footer.php");
- ?>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement