Link to home
Start Free TrialLog in
Avatar of geist62
geist62

asked on

MySQL returns wrong results!

I have a search and results page.  When I call the page in Firefox browser and enter a surname it returns the correct results. However, when I call the page in MS Internet Explorer it doesn't return my search term but returns all enteries in my MySQL database unsorted.  Does it have something to do with the differing urls as noted below and how they are translated by the browsers?

I noticed that Firefox the url string is:  

http://www.postcardsleuth.com/Postcards2/Postcards_Results.php?S_Surname=Coons&Search_x=0&Search_y=0&Search=Search

In Internet Explorer the url string appears as:

http://www.postcardsleuth.com/Postcards2/Postcards_Results.php?S_Surname=Coons
Avatar of gamebits
gamebits
Flag of Canada image

It has to be since you are doing an incomplete query.
hi geist62,

in my FF and IE6 both searches results in the same URL and works without problems?
Avatar of geist62
geist62

ASKER

Any ideas why Internet Explorer would truncate the url?
Do you have any space in the url?
ASKER CERTIFIED SOLUTION
Avatar of imitchie
imitchie
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of geist62

ASKER

If this is a problems any idea how to fix it?  The odd thing is that somes Internet Explorer will consistantly return the correct results (with the full url) and then revert to returning the wrong results (partially formed url). Urggggh!
It all depends on your javascript interaction. Hard to comment without seeing full code.  But I'm not into that, maybe someone can pick up from there.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of geist62

ASKER

Turns out the following code was the culprit:

Line 61 is:
if ((isset($_GET["Search_x"]) && $_GET["Search_x"] != "")) {

Code should be:
 
if ((isset($_GET["S_Surname"]) && $_GET["S_Surname"] != "")) {