Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Can't upload image at all

images php coding issues or problems here.

Moderators: macek, egami, gesf

Can't upload image at all

Postby Gigga » Tue Oct 09, 2012 6:44 pm

I have this in HTML along with the registration info.

<form action="updatemem.php" method="POST" enctype=multipart/form-data">
<label for="image">Upload profile photo:</label>
<input type="file" name="image" />

In Updatemem.php:
$file = $_FILES['image']['tmp_name'];
if (!isset($file))
{echo "no file";
die;}

And when I choose a file, it goes into "no file". I echoed $file and it is blank. I've been looking all over the web and cant find any info. Please help!
Thanks!
Gigga
New php-forum User
New php-forum User
 
Posts: 5
Joined: Tue Oct 09, 2012 6:43 pm

Re: Can't upload image at all

Postby seandisanti » Wed Oct 10, 2012 9:34 am

you're missing a double quote on your enctype
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 679
Joined: Mon Oct 01, 2012 12:32 pm

Re: Can't upload image at all

Postby Gigga » Wed Oct 10, 2012 2:25 pm

I compared it so much and I didn't see that. Thank you.
Gigga
New php-forum User
New php-forum User
 
Posts: 5
Joined: Tue Oct 09, 2012 6:43 pm

Re: Can't upload image at all

Postby seandisanti » Wed Oct 10, 2012 3:03 pm

no problem, did that fix it?
seandisanti
php-forum Fan User
php-forum Fan User
 
Posts: 679
Joined: Mon Oct 01, 2012 12:32 pm


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.