Can I just start off by saying I'm doing a computing course where one of the units is intro to PHP and that I'm JUST starting to get into PHP.
I'm very basic at this point, I have been tasked with making a site with a search page that you can search different movies etc.
My production page (Search Page)
 <!DOCTYPE html>
<html>
<head>
<title>Royal Theatre</title>    
<link rel="stylesheet" href="css/main.css">
<meta name="viewport" content="width=device-width">
<meta charset="UTF-8">
</head>
<body> 
    <header>
        <img src="image/logo2.png">
    </header>
    <div class="nav">
  <ul>
    <li class="home"><a href="index.php">Home</a></li>
    <li class="Production"><a class="active" 
href="production.php">Production</a></li>
    <li class="Contact"><a href="contact.php">Contact</a></li>
  </ul>
</div>
<h1>Search For Shows</h1>
<form action="presults.php" method="GET">
<br>
<label for="name" class="pd">Production Name:</label>
<br>
<input type="text" name="name">
<br>
<label for="genre" class="gnr">Genre:</label>
<br>
<input type="text" name="genre">
<br>
<label for="date" class="dte">Date:</label>
<br>
<input type="date" name="date">
<br>
<label for="time" class="tme">Starting Time:</label>
<br>
<input type="date_list" name="time">
    <datalist id="production">
    <option value="Little Stars: Dance">
        <option value="RSNO Community Orchestra">
            <option value="Nicki Minaj">
                <option value="Harlem Globetrotters">
                    <option value="Alan Davies">
                        <option value="WWE">
                            <option value="Amazon Echo and the singing AI">
                                <option value="Spirited Away The Play">
                                    <option value="A Generic Stand Up Comedy 
Act">
                                        <option value="My Life Is A Joke">
                                            <option value="Rangers Football 
  Club">
                                                <option value="NEDs">
                                                    <option value="NZXT & 
The CAM Software">
                                                        <option 
value="Franky Boil Tribute Act">
                                                            <option 
value="Wee Archie & The Akitas">
  </datalist>
  <input type="submit" name="submit" value="Search" />
    </form>
    <table>
        <?php
        echo "<TR><th>Production Reference</th> <th>Production Name</th> 
<th>Genre</th> <th>Date</th> <th>Starting Time</th> <th>Price Band</th>";
    while ($row = mysqli_fetch_array($result)){
            $reference=$row['reference'];
            $name=$row['name'];
            $genre=$row['genre'];
            $date=$row['date'];
            $time=$row['time'];
            $pband=$row['pband'];
    ?>
            <tr>
                <td>
                    <?php echo "$reference";?>
                </td>
                <td>
                    <?php echo "$name";?>
                </td>
                <td>
                    <?php echo "$genre";?>
                </td>
                <td>
                    <?php echo "$date";?>
                </td>
                <td>
                    <?php echo "$time";?>
                </td>
                <td>
                    <?php echo "$pband";?>
                </td>
            </tr>
            <?php }?>
    </table>
      <footer>
 © Scott
</footer>
</body>   
</html>
My results php
<?php
if(!isset($_GET['submit'])){
header('Location: production.php');
}else{
$name = $_GET['name'];
$genre = $_GET['genre'];
$time = $_GET['time'];
$date = $_GET['date'];
include'connection.php';
$query = "SELECT production.name, production.genre, production.date, production.time, price.adult, price.child, price.concession, price.pband FROM production, price WHERE production.name = '$name' AND production.genre = '$genre' AND production.date = '$date' AND production.time = '$time' AND production.pband = price.pband";
$result = mysqli_query($con, $query);
?>
<!Doctype HTML>
<html>
<head>
<meta charset="utf-8">
<title>Production Results</title>
<link rel="stylesheet" type="text/css" href="main.css"> </head>
<body>
<h1>Search Result</h1>
<table>
<th class="TH">Production Reference</th>
  <th class="TH">Production Name</th>
  <th class="TH">Genre</th>
  <th class="TH">Date</th>
  <th class="TH">Starting Time</th>
  <th class="TH">Price Band</th>
 <?php
if(mysqli_num_rows($result) == 0){echo"<tr> <td class='TD'>" . 'No Results 
Found' . "</td></tr>";}
    while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
 $date = $row['date'];
 $date = strtotime($date);
 $date = date('d-M-Y', $date);
       echo"<td class='TD'><a href='production.php'>Back to the main search 
page</a></td>";
echo "</table>"; 
    echo "<tr>
    <td class='TD'>" . $row['reference'] . "</td>
       <td class='TD'>" . $row['name'] . "</td>
       <td class='TD'>" . $row['genre'] . "</td>
       <td class='TD'>" . $row['date'] . "</td>
        <td class='TD'>" . $row['time'] . "</td>
       <td class='TD'>" . $row['pband'] . '" /> '. "</td>
     </tr>";
    }
echo"</table>";
}
?>
My connection.php
<?php
$host = 'localhost';
$user = 'root';
$pass = '';
$db = 'theatre';
$con = mysqli_connect($host, $user, "",$db);
if(!$con){
die("Connection Failed " . mysqli_connect_error()); 
}else{
echo "";
}
?>
The errors im getting when i search "WWE
Any help at all is really greatly appreciated, I have been at this for hours on end and just can't see what the problem is.
Thanks a lot!
 
     
    