无法从html'form'获取值到'php'文件 [英] Unable to fetch value from html 'form' to 'php' file
本文介绍了无法从html'form'获取值到'php'文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的表格
this is my form
<form method="POST" action="result.php">
<input type="text" value=" " name="q" size="10" id="searchfield" title="searchfield" onFocus="clearText(this)" onBlur="clearText(this)" />
<input type="submit" name="search" value="" alt="Search" id="searchbutton" title="Search" />
这是php文件
and this is the php file
<?php
@session_start();
include 'connections.php';
if (isset($_POST['q']) && $_POST['q'] != "")
{// I am unable to enter here...
$q = $_POST['q'];
$min_length = 1;
if(strlen($q) >= $min_length)
{
....
我在提交价值后无法进入条件..谁能告诉我原因?
I am unable to enter in if condition after submitting the value.. can anyone tell me why?
推荐答案
_POST [ ' q'])&&
_POST['q']) &&
_POST [ ' q']!= < span class =code-string>)
{ // 我无法在这里输入...
_POST['q'] != "") {// I am unable to enter here...
q =
q =
这篇关于无法从html'form'获取值到'php'文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文