Posted by laredotornado@zipmail.com on 03/25/06 21:39
Hi,
I'm using PHP 4 and trying to upload an image. I think I'm using the
right "enctype". Here is the form I submit
<form name=addPhotoForm enctype="multipart/form-data" method=post
action="add_photo_response.php">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td colspan="2" align="center" class="subHeaderClass">Add
Photo</td></tr>
<tr>
<td align="right">Title: </td>
<td align="left"><input type="text" maxlength="255" name="TitleP"
id="TitleP" value=""></td>
</tr>
<tr>
<td align="right">Photo: </td>
<td align="left"><input type="file" name="PhotoImgP"
id="PhotoImgP"></td>
</tr>
<tr><td colspan="2" align="center"><input type="submit"
value="Submit"></td></tr>
</table>
</form>
But in my response page, I get these warnings when I try and check the
value of $_FILES['PhotoImgP'] ...
print "photo param: " . $_REQUEST['PhotoImgP'] . "file: " .
$_FILES['PhotoImgP'] . " " . $_FILES['PhotoImgP']['tmp_name'];
produces
Notice: Undefined index: PhotoImgP in
/usr/local/apache/htdocs/collegedropout/admin/photos/add_photo_response.php
on line 10
Notice: Undefined index: PhotoImgP in
/usr/local/apache/htdocs/collegedropout/admin/photos/add_photo_response.php
on line 10
photo param: shirt.jpgfile: param name: PhotoImgP dest dir:
/usr/local/apache/htdocs/collegedropout/images/photos src_file_path :
Can someone help? Thanks, - Dave
[Back to original message]
|