开发者

how we post value from one page to another page using php

        <form name="frm1" method="post" action="/123/123/123/123/result_page.php">
        <td class="search_bar"><input type="text" name="textfield"  style="width:95%; height:28px; border:0px;"开发者_运维技巧 /></td>
        <td class="search_btn"><a href="/123/123/123/123/result_page.php?searchCity=<?php $_POST['textfield'] ?>"></a></td>
        </form>


Add a submit button to your form:

<form name="frm1" method="post" action="/123/123/123/123/result_page.php">
  <td class="search_bar">
    <input type="text" name="searchCity" />
  </td>
  <td class="search_btn">
    <input type="submit" value="Search" />
  </td>
</form>

Having a link as you have will bypass the form and generate a GET request, not a POST.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜