I am trying to upload a picture file but it is not working. The tmp_name file is empty. Here is a sample of the code I am using. I know that it is basic but I am just trying to get it to work.
<?PHP
echo test1;
if (isset($_POST['add'])) {
echo test2;
echo $_POST['file']['error'];
echo $_POST['file']['tmp_name'];
echo $_POST['file']['name'];
echo test3;
}
echo test4
?>
<form action="<?PHP echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" name="form1">
<p>
<input type="file" name="file">
</p>
<p>
<input name="add" type="submit" id="add" value="submit">
</p>
</form>
All the echos of the $_POST varibles returns nothing. Is there a setting in the set up of PHP in order to get this to work? Please Help.
Thak You Aaron
<?PHP
echo test1;
if (isset($_POST['add'])) {
echo test2;
echo $_POST['file']['error'];
echo $_POST['file']['tmp_name'];
echo $_POST['file']['name'];
echo test3;
}
echo test4
?>
<form action="<?PHP echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" name="form1">
<p>
<input type="file" name="file">
</p>
<p>
<input name="add" type="submit" id="add" value="submit">
</p>
</form>
All the echos of the $_POST varibles returns nothing. Is there a setting in the set up of PHP in order to get this to work? Please Help.
Thak You Aaron