Help with $_FILES[imagefile][name] and mysql

Discussion in 'PHP' started by GFX^^, Mar 26, 2007.

  1. #1
    Hello, I have made a script for uploading images to my server. I also need to add the image names to mysql, so I put:

    mysql_query("insert into db(imagen) values '$_FILES[imagefile][name]')

    but when I put that it adds "array name" to mysql db :S

    Pls help :D
     
    GFX^^, Mar 26, 2007 IP
  2. GFX^^

    GFX^^ Well-Known Member

    Messages:
    1,421
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    168
    #2
    just found how to do it thanks anyway :D

    MOD DELETE THIS!! :D
     
    GFX^^, Mar 26, 2007 IP
  3. commandos

    commandos Notable Member

    Messages:
    3,648
    Likes Received:
    329
    Best Answers:
    0
    Trophy Points:
    280
    #3
    A better solution to write the solution down and let other benefit from it ;) no one know someone , sometime will search for the same thing ...
     
    commandos, Mar 26, 2007 IP
  4. GFX^^

    GFX^^ Well-Known Member

    Messages:
    1,421
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    168
    #4
    the only thing I did was name $_FILES[imagefile][name] as a var and then use it as a var :D
     
    GFX^^, Mar 26, 2007 IP