Tuesday, 2018-07-17, 8:48 AM
Main Sign Up RSS
Welcome, Guest
Site menu
Login form
Search
Tag Cloud
Calendar
«  September 2013  »
SuMoTuWeThFrSa
1234567
891011121314
15161718192021
22232425262728
2930
Entries archive
Our poll
Rate my site
Total of answers: 1
Tag Board
Statistics

Total online: 1
Guests: 1
Users: 0
Main » 2013 » September » 1 » post
11:41 AM
post
<?php
if(isset($_REQUEST['submit']))
{
 $filename= $_FILES["imgfile"]["name"];
 if ((($_FILES["imgfile"]["type"] == "image/gif")|| ($_FILES["imgfile"]["type"] == "image/jpeg") || ($_FILES["imgfile"]["type"] == "image/png") || ($_FILES["imgfile"]["type"] == "image/pjpeg")) && ($_FILES["imgfile"]["size"] < 200000))
 {
 if(file_exists($_FILES["imgfile"]["name"]))
 {
 echo "File name exists.";
 }
 else
 {
 move_uploaded_file($_FILES["imgfile"]["tmp_name"],"uploads/$filename");
 echo "Upload Successful . <a href='uploads/$filename'>Click here</a> to view the uploaded image";
 }
 }
 else
 {
 echo "invalid file.";
 }
}
else
{
?>
<form method="post" enctype="multipart/form-data">
File name:<input type="file" name="imgfile"><br>
<input type="submit" name="submit" value="upload">
</form>
<?php
}
?>
Views: 103 | Added by: zuna | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *: