YourPaste - For your paste! Archive - Tools - Login

qdsfs

Posted by unknown on Wed 25 Jan 2012 15:46 97 views - Syntax: PHP - Expires: never - Report - IMG - Download -

  1. if(isset($_POST['btnSubmit'])){
  2.     $strLocation = "jwplayer/uploads/". basename( $_FILES['uploadedfile']['name']);
  3.  
  4.     if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $strLocation)) {
  5.         $strTitle = $_POST['txtTitle'];
  6.         $strGenre = $_POST['cboGenre'];
  7.         $strDescription = $_POST['txtDescr'];
  8.         $strFilename = $_FILES['uploadedfile']['name'];
  9.         $strQuery = "INSERT INTO `tblMedia` (`id`, `filename`, `title`, `genre`, `description`) VALUES (NULL, '$strFilename', '$strTitle', '$strGenre', '$strDescription');";
  10.         mysql_query($strQuery);
  11.         echo "The file (".  basename( $_FILES['uploadedfile']['name']). ") was uploaded succesfully.";
  12.     } else{
  13.         echo "The file could not be uploaded, please try again!";
  14.     }
  15. }

Comments


Name:
Comment:

© 2010 YourPaste.net - Disclaimer