I had a problem with 4.2.2 version PHP. In the older verison, my codes to upload a file really work, but in this version, it did not work.
The first file displays a form for user to upload a file and called upload.php:
<form method=POST action="upload.php" enctype="multipart/form-data">
<tr>
<td bgcolor="#FFFFFF" width="150">Upload a file:</td>
<td bgcolor="#FFFFFF">
<input type="file" name="pic_path" class="text" size="20" ><center>
</tr>
<tr>
<td colspan="3" bgcolor="#FFFFFF">
<div align="center">
<input type="submit" value="Submit" class="button" name="submit">
<input type="reset" value="Reset" class="button">
</div>
</td>
</tr>
</form>
The upload.php is like this. Notice that I used $_POST to get $pic_path from the above file. But when I tried to output $pic_path, it is nothing.
<?php
$pic_path=$_POST['pic_path'];
echo "File is: ".$pic_path;
copy ($pic_path, "tmp/".$pic_path);
?>
Any idea???? Thanks a lot...