SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Not Returning Desired Results in Selected Browsers

    Hi There

    I am hoping someone can help with this query as I am at a loss.

    I have written this query

    SELECT ID, CompanyName
    FROM wires
    INNER JOIN wireCompanyIndex ON wires.ID = wireid
    WHERE TRUE
    AND wires.CompanyName LIKE "%Wire & Tube Search Ltd%"
    LIMIT 0 , 30

    On a site that I am developing and it works perfectly in Firefox bringing be back exactly what I expect to get from the Database no problems. However, where I try the same feature in Chrome or Safari I get nothing back. Not a blank page but a reload of the form that has just been processed to generate the query (using $_GET)

    Hope someone can help me with this it's driving me round the twist.

    G

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    It nothing to do with the browser not running the query, more likely to be the form and action thats not being sent properly.
    Can you post the form code and $_GET query parameters?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi There

    Thanks for that.

    I have put the controller PHP and the form into two separate pastie documents I hope that is ok (obviously deleted out connection settings - although they do work nicely).

    http://www.pastie.org/2648801 - The Controller
    http://www.pastie.org/2648818 - The From

    Hope this can shed some light on the problem. I am a new PHP Developer so know there are some holes in this as I am still finding my feet.

    G

  4. #4
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah sorry just realised you do not have all the info.

    If in my form I choose a country it all works lovely - on everything.

    If however I leave it as Please Select it does not work

  5. #5
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    You may need to add an 'action' to the form as some browsers wont act without it.
    Code:
    action="<?php echo $_SERVER['PHP_SELF']; ?>"
    That said I just ran a quick test in Chrome on the Mac and it picked it up without it.
    Add an action and see what happens.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  6. #6
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm no still no a happy camper with that - sorry. Still giving me the same result.

    Would you like the URL so you know the site I am talking about?

  7. #7
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    Sure, PM me if you dont want it broadcast
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  8. #8
    SitePoint Member
    Join Date
    Sep 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aha seem to have sorted it with a full URL in the action"" . Although not sure why the JavaScript element in Safari is not working


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •