Jump to content

PHP files upload empty


gongpex

Recommended Posts

Hello everyone, Today I tried to upload my product using <input type="file" > and it shown like this (post-55622-0-95607400-1354281963_thumb.gif). This my code : Form code

<form enctype="multipart/form-data" name="register" id="register" action="?pg=product-upload" method="post" class="content"><input type="file" class="inpt-fm" name="b_img" id="b_img"/></form>

Destination Code

$b_img = $_POST['b_img'];$path = $_FILES['b_img']['name'];copy($b_img,"../temp/$path");

Q : what's mistake on my code? please told me, Thanks

Edited by gong
Link to comment
Share on other sites

have you checked the tutorials? http://www.w3schools.com/php/php_file_upload.asp everything you need is only going to be in the $_FILES array, so I'm not really sure what you're trying to do with $_POST['b_img']

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...