SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2003
    Location
    Brisbane, Australia
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Working in IE but not others ?????

    Hi

    I have a 5 step form and each step writes to the DB.

    All works fine on IE but on other browsers there seems to be some weird error. Step 1 to 4 works fine but step 5 will not write to the DB.

    I have stripped the update back to 1 variable and echoed the viable to be sure there is something in it but still it does not work:

    PHP Code:
    mysql_query("UPDATE listings SET state='$state' WHERE uniqueid='$uniqueid'");

    echo (
    "$state $uniqueid"); 
    The echo reads QLD 38 so the variables are full but it just won't write.

    I am stumped. Why are the all the other steps working but not this one?

    Any ideas?

    Thanks in advance

    mrmbarnes

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    if(!mysql_query("UPDATE listings SET state='$state' WHERE uniqueid='$uniqueid'") die(mysql_error()); 

  3. #3
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think your problem will lie with your associated code around the query, you say it works in IE but not in other browsers, your SQL is browser independant, but the code that surrounds it may well depend on some value being returned from a browser etc, can you post your full code surrounding the query that sometimes works, this will enable us to determine why it may not always work.

    The code that Spencer gave you will tell you if any SQL errors are happening when the data doesnt write, use that too and report the errors here.
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming


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
  •