OK, I'm uisng the code below (file.php and file.html) and I'm getting
the following error:
Parse error: parse error, expecting `','' or `';'' in
/home/user/public_html/file.php on line 15
line 15 is the echo 'File Name line below - I don't understand what
the error is and I also don't understand how the if ($File_name) var
is working - where is this var coming from???
file.php code:
<?php
if ($File_name)
{
if (copy($FileToUpload, "./uploads/$File_name"))
{
echo 'File Name :' . $File_name .';
echo 'File Size :' . $File_size .';
echo 'The file was successfully uploaded!';
}
else
{
echo 'Your file could not be copied.';
}
unlink($FileToUpload);
}
?>
HTML code:
<form method="post" action="file.php">
<input type="File" name="FileToUpload">
<input type="submit" value="submit">
<input type="reset" value="reset">
</form>
On Sat, 23 Aug 2003 14:44:20 GMT, Ralph Freshour <ra***@primemail.com>
wrote:
I'm trying to code the ability for my users to upload up to photo's to
mysql database - can someone point me in the right direction as to how
this might be done in php? Perhaps a tutorial or some code samples?
My two php books don't cover uploading photo's to a web site.
Thanks...