RE: [PHP] uploading a file
| From: | Balaji Ankem | Date: | Mon, 01 Jul 2002 16:10:53 +0000 |
| Subject: | RE: [PHP] uploading a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104711@lists.php.net to get a copy of this message | ||
Upload.html
===============
<!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en">
<HTML>
<TITLE>
FileUpload
</TITLE>
<head>
<script language="Javascript">
function check()
{
document.upload.method = "POST";
document.upload.enctype='multipart/form-data'
document.upload.action="upload.php";
document.upload.submit();
return true;
}
</script>
</head>
<BODY>
<center>
<form name="upload" Onsubmit="return check()"
enctype='multipart/form-data'>
<br><br><br><br>
<table border="0" width="100%">
<tr><td width="30%" align="right"><b><font
size="2"
face="Arial">File &
nbsp; </font></b></td><td
width="5%"></td><td
width="50%"><input type='file' name='path' size="16"
value="">
</td></tr>
<tr>
<td width="50%" align="right">
<p align="left">
</td>
<td width="5%">
</td>
<td width="50%">
<p align="left"> <input type="submit" Value="UPLOAD"
></td>
</tr>
</table>
</form>
</center>
</BODY>
</HTML>
Upload.php
================
<?php
if(copy($path,$path_name))
{
print "<br><br><br><center><font face='verdana' size=+2
color=blue>Your file $path_name has been uploaded!!!</font></center>" ;
}
else
{
print "<font face='verdana' size=+2 color=red>A problem was
encountered during your file upload.</font><br>";
}
?>
=================
-----Original Message-----
From: Phil Schwarzmann [mailto:pschwar@jhmi.edu]
Sent: Monday, July 01, 2002 9:29 PM
To: php-general@lists.php.net
Subject: [PHP] uploading a file
anyone have some code they can send me that will successfully upload a
file? I've got all the HTML correct, it's just that my PHP code ain't
working.
Thanks!
Phil
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************