Link to home
Start Free TrialLog in
Avatar of mgtm3
mgtm3Flag for Israel

asked on

i am trying to make an upload system for in php but i have a problem

i am trying to learn about the $_FILES['type']
there isa problem
i am trying to upload a photo named Untitled3.jpg using this script


<html>
<body>
  <form enctype="multipart/form-data" action="filephp.php" method="post">
    <input type="hidden" name="MAX_FILE_SIZE" value="20000" />
    Choose a file to upload: <input name="fffffile" type="file" />
    <input type="submit" value="Upload" />
  </form>
</body>
</html>

and the script

<?php

$type=$_FILES['fffffile']['type'];


echo $type;
?>
when i run this it needs to echo the type of the file jpg
but when i really run it it does not echo i just get blank page

why?

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mgtm3

ASKER

how can i tell it to provide this?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mgtm3

ASKER

thanks