Sun Oct 26, 2008 9:31 pm
<form action="<?php print $PHP_SELF?>" enctype="multipart/form-data" method="post">
Last name:<br /> <input type="text" name="name" value="" /><br />
class notes:<br /> <input type="file" name="classnotes" value="" /><br />
<input type="submit" name="submit" value="Submit Notes" />
</form>
<?php
define ("filesplace","./");
if (is_uploaded_file($_FILES['classnotes']['tmp_name'])) {
if ($_FILES['classnotes']['type'] != "application/pdf") {
echo "<p>Class notes must be uploaded in PDF format.</p>";
} else {
$name = $_POST['name'];
$result = move_uploaded_file($_FILES['classnotes']['tmp_name'], filesplace."/$name.pdf");
if ($result == 1) echo "<p>Upload done .</p>";
else echo "<p>Sorry, Error happened while uploading . </p>";
} #endIF
} #endIF
?>
Fri May 10, 2013 12:04 am
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.