Jump to content

upload problem with database


grlayouts

Recommended Posts

i have an upload script that uploads the file fine. however it will not add the image to the database.

 

i have placed the bit of code below, any ideas?

 

      {
      move_uploaded_file($_FILES["file"]["tmp_name"],
      'uploads/'. $_FILES["file"]["name"] .'');
      echo "Stored in: " . "uploads/" . $_FILES["file"]["name"];
  print '<p>'.$type.'</p>';
  mysql_query("insert into images (user, image) values('$stat[id]','. $_FILES["file"]["name"] .')") or die("Could not update database.");
      }

Link to comment
https://forums.phpfreaks.com/topic/56684-upload-problem-with-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.