Reply to Trouble uploading image

Your name:

Reply:


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:&nbsp;</td>
<td align="left"><input type="text" maxlength="255" name="TitleP"
id="TitleP" value=""></td>
</tr>
<tr>
<td align="right">Photo:&nbsp;</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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация