My task is i want to create form for search field. want to transfer the value from search to required php file which is 'result.php'. But I am getting bug that I am unable to solve this. please anyone help me. I am new to php..
HTML CODING :
<form action="result.php" method="POST">
<input type="search" name="query" size="10" id="searchfield" title="searchfield" />
<input type="submit" name="Search" value="" alt="Search" id="searchbutton" title="Search" />
</form>
PHP CODE :
//result.php
@session_start();
include 'connections.php';
//echo "hai"; // I debug this code with the help of echo statements. and successfully printing hai
if (isset($_POST['query']) && $_POST['query'] != ""){// unable to enter in `if` condition
$query = $_POST['query'];
$min_length = 1;
if(strlen($query) >= $min_length)
{
$query = htmlspecialchars($query);
$query = mysql_real_escape_string($query);
............`
value that entered in search field is not going from 'HTML' form to 'PHP' file to perform required operations please anyone help me to solve this bug..