Jump to content

Image Upload Info Help-o


joecool308
 Share

Recommended Posts

Why does this not work? My error message is : Notice: Undefined index: screenshot in C:\wamp\www\site\picresult.php on line 3This:<form enctype="multipart/form-data" action="picresult.php" method="post"><input type="file" name="screenshot" /><input type="submit" /></form>And then this:<?php$picture=$_FILES['screenshot']['name'];echo $picture;?>

Link to comment
Share on other sites

It's been a while since I've called PHP scripts from a different page, but I'm pretty sure it works the same way. Try adding extract($_POST); to the top of the variable $picture.

Edited by RahXephon
Link to comment
Share on other sites

mmmmmmm....no.It still says undefined index. I don't think I actually need the method="post" in the form, but it doesn't work either way.This really should be front and forward - really irks me

Link to comment
Share on other sites

Check your PHP settings. I see by the path in your warning you have a localhost, make sure file uploads is checked (enabled)

Edited by RahXephon
Link to comment
Share on other sites

Oh woops. $_FILES not $_FILE. I got it. Wow.....it's been a long day.

Link to comment
Share on other sites

At least you got it right on here. I know too well those kind of problems... I usually just step away from my computer for a while to take a short break and have it go at it. Usually find the errors right away.

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
 Share

×
×
  • Create New...