gongpex Posted November 30, 2012 Share Posted November 30, 2012 (edited) Hello everyone, Today I tried to upload my product using <input type="file" > and it shown like this (). 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 November 30, 2012 by gong Link to comment Share on other sites More sharing options...
thescientist Posted November 30, 2012 Share Posted November 30, 2012 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 More sharing options...
gongpex Posted December 1, 2012 Author Share Posted December 1, 2012 Thanks, I had check and it's work.______________________________________________________________________ OFF : Do you like the guitar? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now