Solar Posted January 2, 2009 Share Posted January 2, 2009 Okay, I've setted up a blog on my website so that users are to post their own news. Of course it was a simple blogging scrip so theirs no protection. I also use a simple login. The login script I am using uses mysql and can be found here; http://www.evolt.org/PHP-Login-System-with-Admin-Features I have a folder called blogs, That will show the new posts on anyones blogs. A sub folder called users, that will have the list of users folders/blogs. Each person who wants a blog, I will create them a new folder with their name inside the Users folder. My question is; In the code below; post.php; is their away to only allow the user who owns the folder to access the post.php? Example; Solar wants to make a new post. He goes to the site/blogs/users/Steven/post.php Allow him to make a new post while John wants to post in Solar's to make himself funny so he decides to go to site/blogs/users/Steven/post.php and is alloud to. I do not want that to happen ??? <?php require_once("News.class.php"); $newsHandler = new maxNews(); if (!isset($_POST['submit'])) { ?> <?php $newsHandler->displayAddForm(); ?> <?php } else { $newsHandler->insertNews(); } ?> Thanks for your help! Link to comment https://forums.phpfreaks.com/topic/139172-protecting/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.