Jump to content

jstu327

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jstu327's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. jstu327

    search?

    Hi a2bardeals, Here are a few things I would check. 1. Make sure the method in search.html is set to POST because that is what you are using in your query. 2. If that is set to POST, then you can look at your query. Try putting an actual name in that you know exists in your database. i.e.  $result = mysql_query("SELECT name, city, state, id FROM a2_bars WHERE name LIKE 'Bob' "); (or whatever name might exist) 3. If that gives you a result, then the problem lies with your  WHERE name LIKE '".$_POST['term']."' Try setting a variable to your search term and using it in your query accordingly. i.e. $searchcontact = $_POST ['term']; $result = mysql_query("SELECT name, city, state, id FROM a2_bars WHERE name LIKE '%$searchcontact%' "); Also, I've found it helpful to put some html on the result page, or print out "ran successfully" after my queries during testing. That way, if the page comes up but there are no results, then you have query problems.  But, if the page is blank it's most likely a syntax error in your php somewhere.  In that case, just check your error logs. Hope this helps you out! Jay
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.