Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9031295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:41:46+00:00 2026-06-16T07:41:46+00:00

Here is my scenario, All things were working fine ,based on what I enter

  • 0

Here is my scenario, All things were working fine ,based on what I enter in the search form the appropriate image was displayed. But since I have added that auto suggest feature on my site, it seems like whatever I write in search box and presses search, I think my input form is not sending data to php. beacuse even if I type something in form, Still this condition is getting false.
( $name contains the value user inputs):

if(!empty($name))

Here is my html form:

<form class="searchform" action="webpage.php" method="POST">
<input class="searchfield autosuggest" type="text"  placeholder="Search for a name " onFocus="if (this.value == 'Search...') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'Search...';}" />
<input class="searchbutton" type="submit" value="Go" />
</form>

The latest script I added for auto suggest is this :

  //Autosuggest starts here


$(document).ready(function(){
$('.autosuggest').keyup(function(){


var search_term= $(this).attr('value');
$.post('search.php',{search_term:search_term},function(data){

    $('.results').html(data);

    $('.results li').click(function(){
        var result_value = $(this).text();
        $('.autosuggest').attr('value',result_value);
        $('.results').html('');
    });

});

});
});

</script> 

Finally this is another search.php file for querying through the database for autosuggest :

if(isset($_POST['search_term'])== true && empty($_POST['search_term'])== false)
{
    $search_term = mysql_real_escape_string($_POST['search_term']);
    $query = mysql_query("select * from user_info where Name LIKE '$search_term%'");

    while(($rows = mysql_fetch_assoc($query))!== false)
    {
    echo '<li>'.$rows['Name'].'</li>';
    }
}

Now the auto suggest is working but not the main site. Could it be a positioning issue of my image or php not receiving data from my input form ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:41:47+00:00Added an answer on June 16, 2026 at 7:41 am

    you should add name attribute to your input box

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all. Here is the scenario. I have the below code, and I'm needing
I know how to write tab host,but here the scenario is little bit different
Here's my scenario. I have an application written in C++ but not the complete
Scenario I'm moderating a website that has moved to a Wordpress based setup, but
I've already read this but it doesn't answer to my question. Here's my scenario:
So, here's the scenario : I have a page in my asp.net c# based
Here the scenario : A method is called each minute by a timer. This
Here is the scenario. I'm writing my geo-ruby oracle adapter for Ruby On Rails
Here's the scenario: In production, I want to send and receive sms messages. In
Here's the scenario. As a creator of publicly licensed, open source APIs, my group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.