Hi there, here's an upload form that might be what u are looking for:
Hope his helps you out :)
Joe


php page 1

<form action='upload.php' method='post' enctype='multipart/form-data'>
<input type='hidden' name='MAX_FILE_SIZE' value='102400'>
<P><font color='#ffffff' face='verdana' size=1>Upload Photo:</font><input
type='file' name='userfile'><input type='submit' value='Upload!!!'></form>



php page 2 -- receiving/upload processing page

<?php

# $userfile is the file being uploaded --- could rename the file if you
wanted or add a timestamp to prevent multiple instances of same filename


print $userfile . "<BR>";
print $userfile_name . "<BR>";

// copy the file being posted
if(copy($userfile, "/ez/codesnipits/temprotatingimages/". $userfile_name)){
print "Your photo has been uploaded and renamed successfully.<br>" ;
}
else
{
print "No luck with the upload dude.<br>";
}


# create a path for storing into database
$patharola = "temprotatingimages/". $userfile_name;
print $patharola;

// insert path into database here
// connect to db
$connectionToDBid = odbc_connect("cts", "jqwwode", "dfgh5");

# query statement
$sqlr = "INSERT INTO IMAGES (employee_id, imagepath) VALUES ($employeeid ,
'$patharola' )";
# execute the sql statement (query) on the connection made
$resultset = odbc_do($connectionToDBid, $sqlr);

?>








"Duky Yuen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I want to make something like when you are attaching something to an
> email in hotmail. I want to make something that searches your own
> computer for files on your harddisk that you want to upload to the
> server.
>
> But I don't know if this is possible. If this is possible.Can somebody
> tell me which function I should use? Or if someone have an example...
> please...
>
> Duky
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to