<?php require_once "/php/classes/InfoManager.php"; if (isset($_GET["search"])) { $course = htmlspecialchars($_GET["search"]); echo jsearchCourses($course); }
?> <br /> <form method="get" action="home" class="form-horizontal"> <div class="col-sm-4"> <input name="search" id="search-input" type="text" placeholder="Search..." class="form-control" /> </div> <div class="col-sm-2"> <input type="submit" value="Search" class="btn btn-default btn-block" /> </div> </form> <br /> <br /> <div id="search-result" <?php if (isset($_GET['search'])) { echo "data-ng-init='courses=" . jsearchCourses($_GET['search']) . "'"; } ?> > <?php if (isset($_GET['search'])) { ?> <div class="col-sm-6" data-ng-repeat='course in courses'> <course-info info="course"></course-info> </div> <?php } ?> </div> </div> </div>