<div class="container"> <div class="col-md-4 col-md-offset-4"> <img src="http://static6.businessinsider.com/image/539aedc269beddc243d29c52-800-371/netflix_web_logo.png" height="100"> <hr> <form action="<?php echo $_SERVER['PHP_SELF']; ?> " method='POST'> <input type="text" name="title" placeholder="title" onclick=""><br><br> <input type="text" name="year" placeholder="year" onclick=""><br><br> <input type="text" name="director" placeholder="director" onclick=""><br><br> <input type="text" name="actor" placeholder="actor" onclick=""><br><br> <input type="submit" name="search"><br><br> </form> </div> </div> <?php if (isset($_POST['search'])) { $try = new NetflixSearch(); $try->setTitle($_POST['title']); $try->setYear($_POST['year']); $try->setDirector($_POST['director']); $try->setActor($_POST['actor']); $try->search(); }