Jump to content

[very noob question]


xtjx09

Recommended Posts

So I'm writing  a upload page, and eventually a download but i need this to work first. This is my upload scripts

<?php
    echo "Uploaded: " . $_FILES["file"]["name"] . "<br />";
    echo "Be a happy Wyant";
    echo $_POST['$name'];
    #echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

      if(isset($_POST['submit'])){
      	  	
   			$file = $_POST['file']; 
   			#@mysql_query($file);
   			$sql2="INSERT INTO items (name, file) VALUES('$name', '$file')";
   			#@mysql_query($sql2);
   			
      }
?>

and this is my form

<form action="index.php" method="post" enctype="multipart/form-data">

<label for="file">Filename:</label>

<input type="file" name="file" id="file" /> 
<input type="name" name="name" id="name">

<br />

<input type="submit" name="submit" value="Submit" />

</center>

</form>

 

 

I have my table set up to get $name and $file, and the type for the file is mediumblob, which i THINK is correct, the name doesnt upload and i only get 50% of the files uploaded.

 

noob question i know but could i get some pointers?

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/131417-very-noob-question/
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.