Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在变量中插入_Post响应_Php_Search_Post_Get - Fatal编程技术网

Php 在变量中插入_Post响应

Php 在变量中插入_Post响应,php,search,post,get,Php,Search,Post,Get,搜索页面如下所示 <form method="post" action="response.php"> <input type="text" name="varianta" value="var_varianta"> <input type="submit"> </form> <?php session_start(); $var_varianta= $_POST['varianta']; ?> 如何输入过滤值=

搜索页面如下所示

<form method="post" action="response.php">
    <input type="text" name="varianta" value="var_varianta">
    <input type="submit">
</form>

<?php
session_start();
$var_varianta= $_POST['varianta'];
  ?>
如何输入过滤值=>**变量**;在搜索字段中输入的$var_varianta


谢谢

不清楚你在问什么,但似乎有些困惑$_POST包含已提交的值,而不是用户正在输入的值。因此,$\u POST变量是在操作页面上设置的,而不是在显示表单的页面上设置的。您不能在显示表单的页面上设置PHP中的$\u POST变量,并期望操作页面知道这一点

如果我正确理解您的问题,您应该在操作页面上使用$_POST['Variata']来访问提交的内容

 $filters[] = array("filterType" => "resultLimit", "filterValue" => "varianta");