-4
<?php
		if (isset($_FILES["file"]["name"]))
		{	
		if ($_FILES["file"]["type"] == "application/x-download"
		|| ($_FILES["file"]["type"] == "application/octet-stream" && strrchr($_FILES['file']['name'],'.')==".odt")
		|| $_FILES["file"]["type"] == "text/plain")
		{
		if ($_FILES["file"]["error"] > 0)
		{
		echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
		}
		else
		{
		echo "Upload: " . $_FILES["file"]["name"] . "<br />";
		echo "Type: " . $_FILES["file"]["type"] . "<br />";
		echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
		move_uploaded_file($_FILES["file"]["tmp_name"],
		'upload/'.count(glob("upload/*")).strrchr($_FILES['file']['name'],'.'));
		echo "Thank You, we have receive your application form" . "<br />";
		echo "We will contact you once your application has been processed!"; 
		}
		}
		else
		{
		echo "ERROR: you have uploaded an Invalid file";
		echo'<form action="upfile.php" method="post" enctype="multipart/form-data"><label for="file">Filename:</label><input type="file" name="file" id="file" /><br /><input type="submit" name="submit" value="Submit" /></form>';
		}
		}
		else
		{
		echo"ERROR: there is no file selected or uploaded";
		echo'<form action="upfile.php" method="post" enctype="multipart/form-data"><label for="file">Filename:</label><input type="file" name="file" id="file" /><br /><input type="submit" name="submit" value="Submit" /></form>';
		}
?>

Edited by Ezzaral: Updated code tag.

Votes + Comments
Does not appear to take the forums seriously.
php to Python without good subject even
4
Contributors
7
Replies
8
Views
6 Years
Discussion Span
Last Post by danholding
0

I hope moderators delete this post. Danholding should take this forum more serious, afterall its so many professionals helping for free!

0

Ho, ho. From his profile, he's going to univericity and he's in a trance most of the time. Well, speaks for itself.

0

right guys ok my bad for posting i am currently doing some right ups and posted this just to get the colour code, i FORGOT to remove it after.

afterall its so many professionals helping for free!

he's in a trance most of the time. Well, speaks for itself.

to me that does not seem very professional!
+ just a note i am not at uni studying i work for the uni !

0

Twas a joke fghjg. We've all been waiting around for you to come back with a question. Still nothing? You're working for the Uni?! My mistake. I do apologise. :)

0

@ardav no worries,
and to who ever this conserns please remove this post as i cant seem to find a way to remove it and yes its a meaningless post people please stop messageing stating that it is, thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.