Here are some articles I found on different forums while on uploading files
etc, these should give you a head start.

use the move_uploaded_file ( string filename, string destination)

-> the one below is great it explains it in a very simple manner:
How do I find the file I just uploaded to the webserver and load it?

No matter where the file is uploaded, php will store certain variables for
you containing information about the file.  The full path and filename are
located in the variable with the same name as your file form field.
Let's say you called your file upload field "Picture" and that your Apache
temp directory is /inetpub/tmp/.
In your script, the variable $Picture will contain "/inetpub/tmp/1002.tmp"
where 1002.tmp is the temporary name of the file uploaded.  The variable
$Picture_name will contain the origional file name.
Performing a copy ($Picture, "./images/" . $Picture_name); will put the
image, proper name and all, in the images directory under the script root.
If the security on the server will not allow you to use the copy command,
try the file commmands to create and write a new file: (fopen, fread,
fwrite).  If the server security will not allow that command either, try
putting the images into a blob or binary field in your database.

->Here is an example of a script i found from some  foroum :

// Complete working file upload example, Win2KPro, Apache 1.3x, PHP 4.x

// Set this line in php.ini
// upload_tmp_dir = /Library/WebServer/

function handleupload() {
if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {

$realname = $_FILES['userfile']['name'];
print "<b>$realname</b> was uploaded successfuly to the upload directory";

print "";

} else {
echo "Possible file upload attack: filename

Good luck with it, I my self is a newbie hope it helps you.

"Quique Notelodigo" <[EMAIL PROTECTED]> wrote in message
> I want to upload a image, from the client, to the server.
> I use PHP and MySQL and Apache in the server.
> ¿How can I do it?
> _________________________________________________________________
> Charla con tus amigos en línea mediante MSN Messenger:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to