Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <form id='login' action='login.php' method='post' accept-charset='UTF-8'>
  2. <fieldset >
  3. <legend>Login</legend>
  4. <input type='hidden' name='submitted' id='submitted' value='1'/>
  5. <label for='username' >UserName*:</label>
  6. <input type='text' name='username' id='username' maxlength="10" />
  7. <label for='password' >Password*:</label>
  8. <input type='password' name='password' id='password' maxlength="10" />
  9. <input type='submit' name='Submit' value='Submit' />
  10. </fieldset>
  11. </form>
  12.  
  13. <?php
  14. $usr="root";
  15. $pwd="root";
  16. $username=$_POST['username'];
  17. $password=$_POST['password'];
  18. if(($username==$usr) && ($password==$pwd) )
  19. {
  20. header('Location: ./upload.php');
  21. }
  22. else
  23. {
  24. echo '<br>login unsuccessfull';
  25. }
  26. ?>
  27.  
  28. $errors = array();
  29. $uploadedFiles = array();
  30. $extension = array("jpeg","jpg","png","gif","JPG","JPEG","GIF","PNG");
  31. $bytes = 1024;
  32. $KB = 100024;
  33. $totalBytes = $bytes * $KB;
  34. $UploadFolder = "./images";
  35.  
  36. $counter = 0;
  37.  
  38. foreach($_FILES["files"]["tmp_name"] as $key=>$tmp_name) //throws an error
  39. {
  40. $temp = $_FILES["files"]["tmp_name"][$key];
  41. $name = $_FILES["files"]["name"][$key];
  42.  
  43. if(empty($temp))
  44. {
  45. break;
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement