0

'HTML' form

     <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>

result php file

<?php 
@session_start(); 
include 'connections.php';
if (isset($_POST['query']) && $_POST['query'] != "")


$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..

3
Contributors
4
Replies
39
Views
2 Years
Discussion Span
Last Post by subbu_1
0

Thank you very much for your reply I checked my code as your suggestion.. but it is printing NULL even though I am passing value...

$query = var_dump($_POST['$query']);
echo $query;

and it is printing 'NULL' @pixelsoul

Edited by subbu_1

0

action is finding 'result.php' file I checked by placing echo statments....@Sikkander Nasar

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.