Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. if(isset($_POST['save'])){
  4.  
  5. $image = $_FILES['img']['name'];
  6. $target_dir = "../blog/upload";
  7. $target_file = $target_dir . basename($_FILES["img"]["name"]);
  8. move_uploaded_file($_FILES['img']['tmp_name'],$target_file);
  9.  
  10. //get rid of all database operation and connection
  11.  
  12. }
  13. ?>
  14.  
  15. <form action="add_posts.php" method="POST" enctype="multipart/form-data">
  16. <div class="form-group">
  17. <label for="img"><span class='name'>Select Image:</span></label>
  18. <input type="file" class="form-control" name="img" id="img"
  19. placeholder="Image">
  20. </div>
  21.  
  22. localhost/sensive_blog/admin_panel/add_posts.php
  23.  
  24. admin_panel
  25. ->otherScript.php
  26. ->somefolder
  27. ->add_post.php
  28. blog
  29. ->someotherscripts.php
  30. ->folder
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement