Ok, so I have a small dictionary program connected to a database. The user can add words to the database, delete words, and (in a perfect world) search through all existing words and see the definition they were looking for on the screen. That last bit is the problem. I have no idea how to search through all the existing words in my database and put the one I was looking for above the `inputs`. How to I display the result of a search?

Here's the code:

```
<?php

    $link = //here is where my database connection info would go
    if (mysqli_connect_error()) {

        die("Could not connect to database");

    }

    if(isset($_POST['add'])){
        $mysqli = //here is where my database connection info would go
        $sql = "INSERT INTO users ( word,def) VALUES ( '{$mysqli->real_escape_string($_POST['word'])}', '{$mysqlii->real_escape_string($_POST['def'])}' )";
        $insert = $mysqli->query($sql);
        header("Refresh:0");

    }

    if(isset($_POST['delete'])){
        $mysqli = //here is where my database connection info would go
        $command = "DELETE FROM users WHERE `word`='{$mysqli->real_escape_string($_POST['delete-word'])}' or `def`= '{$mysqli->real_escape_string($_POST['delete-def'])}' ";
        $delete = $mysqli->query($command);
        header("Refresh:0");

    }

    if(isset($_POST['search'])){
        //this is where the code would go to search the database and output the answer on the screen.

    }

 ?>

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Dictionary search</title>
</head>
<body>

<form class = "forms" method = "post" action = "index.php">
<input type = "text" name = "word" placeholder="Add Word...">
<input type = "text" name = "def" placeholder="Add Definition...">
<input type = "submit" name = "add" value = "Add">
</form><br>

<form class = "forms"  method = "post" action = "index.php">
<input  type = "text" name = "delete-word" placeholder="Delete Word...">
<input type = "text" name = "delete-def" placeholder="Delete     Definition...">
<input type = "submit" name = "delete" value = "Delete">
</form>

<form class = "forms"  method = "post" action = "">
<input  type = "text" name = "search-word" placeholder="Look Up Word...">
<input type = "text" name = "search-def" placeholder="Look Up Definition...">
<input type = "submit" name = "search" value = "Search Dictionary">
</form>
</body>
</html>

```