Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

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
0
geist62
Asked:
geist62
  • 3
  • 2
  • 2
  • +2
2 Solutions
 
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
 
geist62Author Commented:
Any ideas why Internet Explorer would truncate the url?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
gamebitsCommented:
Do you have any space in the url?
0
 
imitchieCommented:
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
 
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
 
fiboCommented:
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now