xtjx09 Posted November 4, 2008 Share Posted November 4, 2008 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 More sharing options...
xtopolis Posted November 5, 2008 Share Posted November 5, 2008 $_POST['$name'] should be $_POST['name'] if I'm not mistaken. Link to comment https://forums.phpfreaks.com/topic/131417-very-noob-question/#findComment-682580 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.