2017-09-04 12:55
浏览 41


I have a simple form in which the user can enter a search term:

<form class="form-inline justify-content-center" id="searchForm">
      <div class="form-group">
            <label class="sr-only text-info" for="searchTerm">Search term</label>
            <input type="text" class="form-control mb-2 mr-sm-2 mb-sm-0" name="searchTerm" id="searchTerm" placeholder="Search">
       <button type="submit" class="btn btn-info">Search</button>

And I send the form using ajax like this:

$form = $(e.target);
        url: "searchmovielist.php",
        type: "GET",
        data: {form: $form.serialize(), username: getCookie('username')},
        success: function (response) {

My question is how do I retrieve the fields from the form in php if I get the form using $_GET['form']?

1条回答 默认 最新

相关推荐 更多相似问题