Re: Re: uploading files
| From: | Shaun Thornburgh | Date: | Fri, 01 Nov 2002 21:19:05 +0000 |
| Subject: | Re: Re: uploading files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-122456@lists.php.net to get a copy of this message | ||
Thats all fine
Here is my form header
<form enctype=\"multipart/form-data\" name=\"Edit_Category_Form\"
method=\"post\"
action=\"edit_images_form.php?property_id=$property_id&category_id=$category
_id&sub_category_id=$sub_category_id&sub_category_title=$sub_category_title&
sub_category_description=$sub_category_description\">
"Kevin Stone" <kevin@helpelf.com> wrote in message
news:020201c281ec$04515820$6601a8c0@kevin...
> Confirm that you're using the proper header information in your HTML
<form>
> tag..
> <form action="upload.php" method="POST"
> enctype="multipart/form-data">
> -Kevin
>
> ----- Original Message -----
> From: "Shaun Thornburgh" <shaun@mania.plus.com>
> To: <php-general@lists.php.net>
> Sent: Friday, November 01, 2002 1:51 PM
> Subject: [PHP] Re: uploading files
>
>
> > My apologies, here is the code!
> >
> > //copy image to server
> > if ($image != "none") {
> > if (copy ($image, $dir.$image_name)){
> > echo "<p>File upload successful!</p>";
> > } else {
> > echo "<p>File upload unsuccessful!</p>";
> > }
> >
> > //new name of image
> > $new_name = "$property_id-$category_id-$sub_category_id.jpg";
> >
> > //rename the file
> > rename($dir.$image_name, $dir.$new_name);
> > }
> >
> >
> > "Shaun Thornburgh" <shaun@mania.plus.com> wrote in message
> > news:20021101205003.11053.qmail@pb1.pair.com...
> > > I am attempting to upload image files to the server from a users
browser
> > > using the following code, however, the images seem to get corrupted,
> they
> > > look completely different and the file sizes are generally smaller,
also
> > it
> > > sometimes says file upload unsuccessful, even when it does upload the
> > file?
> > >
> > > Any ideas?
> > >
> > > Thank you
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>