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
geist62Asked:
Who is Participating?
 
imitchieConnect With a Mentor Commented:
That has to do with the way Firefox and IE differ when passing information from IMAGE form tags used for POST.
Firefox in this case (the version you have) is populating Button.X and Button.Y (position within button clicked) and Search=Search (the image/button clicked to cause the post).  IE does a default post action without any of these additional info
0
 
gamebitsCommented:
It has to be since you are doing an incomplete query.
0
 
nizsmoDeveloperCommented:
hi geist62,

in my FF and IE6 both searches results in the same URL and works without problems?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
geist62Author Commented:
Any ideas why Internet Explorer would truncate the url?
0
 
gamebitsCommented:
Do you have any space in the url?
0
 
geist62Author Commented:
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!
0
 
imitchieCommented:
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.
0
 
Bernard S.Connect With a Mentor CTOCommented:
You might test the effect of assigning a value of "search" to the search button, so that you force the value to be passed on
0
 
geist62Author Commented:
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"] != "")) {

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.