On choose searched city redirect using form to another page using PHP and JS

i will try to explain my problem and i hope that you will help me. I create database called go_city_list and store into that database city_name and url address. This is how i want to work index page. When user visit index page, they have live search form, when user type city name, search will show avalible citys from database, when user find appropriate city on submit they will be redirect to choosed city. Problem is next, i created live search form which only display avalible citys from database and not code redirection or onClick to redirect user to next page. I will show you my code to figure how to resolv that or what kind of code to use to resolve my issue. NOTE: I know that i can create select list and put javascript code 'onclick="location.href = 'www.yoursite.com';"' but i need to do on way i write. Thanks all.

Index page code:

        <title>Index page</title>
        <script type="text/javascript">
        $('.search-box input[type="text"]').on("keyup input", function(){
            /* Get input value on change */
            var inputVal = $(this).val();
            var resultDropdown = $(this).siblings(".result");
                $.get("cgi/backend-search.php", {term: inputVal}).done(function(data){
                    // Display the returned data in browser
            } else{

        // Set search input value on click of result item
        $(document).on("click", ".result p", function(){
        <form class="card card-sm go-rsfip">
                    <div class="card-body row no-gutters align-items-center">
                        <div class="col-auto">
                            <i class="fas fa-search h4 text-body"></i>
                        <div class="col search-box">
                            <input class="form-control form-control-lg form-control-borderless" autocomplete="off" type="text" placeholder="Choose city...">
                            <div class="result"></div>
                        <div class="col-auto ml-3">
                            <div class="go-rsbipd">
                                <button class="btn btn-lg btn-success go-rsbip" type="submit">Next</button>

Code for backend-search.php:

        $pdo = new PDO("mysql:host=localhost;dbname=db_name", "db_user", "db_pass");
        $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    } catch(PDOException $e){
        die("ERROR: Could not connect. " . $e->getMessage());
            $sql = "SELECT * FROM go_city_list WHERE city_name LIKE :term";
            $stmt = $pdo->prepare($sql);
            $term = $_REQUEST["term"] . '%';
            $stmt->bindParam(":term", $term);
            if($stmt->rowCount() > 0){
                while($row = $stmt->fetch()){
                    echo "<p>" . $row["city_name"] . "</p>";
            } else{
                echo "<p>Not in your city? Please, <a href=''>Request your city</a>. 
    } catch(PDOException $e){
        die("ERROR: Could not able to execute $sql. " . $e->getMessage());

If you need more information write to know. Thanks to all :)