I've been trying to fix this for hours. please help me :)

Discussion in 'PHP' started by Webalized, Oct 31, 2010.

  1. #1
    Hello!

    I've got this code that uploads a csv to a mysql database and it's not working. It says Failed every time, I have no idea why. Please check it out and let me know if you have any idea why it's not working.

    http://pastebin.com/UysjGbSU

    THANK YOU!
     
    Webalized, Oct 31, 2010 IP
  2. leh

    leh Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It would help if we knew what error you are getting. Especially since we can't test it ourselves.
     
    leh, Nov 1, 2010 IP
  3. Webalized

    Webalized Peon

    Messages:
    208
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I told you, it says "Failed" every time I try to upload a file.

    thanks for the help!
     
    Last edited: Nov 1, 2010
    Webalized, Nov 1, 2010 IP
  4. leh

    leh Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    From looking at your code you should also be getting atleast one more line of text as an error.
    Lines 116-120 outputs the actual error.

    You could try and change line 102 to read $fail[] = mysql_error($connection); perhaps that will help with the missing error message.
     
    leh, Nov 1, 2010 IP