Tags: New Folder, Php Mysql
Search
Archives
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
Categories
- Business
- Computer Networking
- Computers
- Ecommerce
- External Mail (POP)
- Internet
- Languages
- Marketing
- Online Business
- Online Education
- Other - Computers
- PHP Books
- Php Scripts
- Primary & Secondary Education
- Programming
- Programming & Design
- Security
- Seo
- Software
- Technology
- Uncategorized
- United States
- Web Design
- Web Hosting
- Wordpress Themes
wireless headphones | toy story toys


2 Comments to '(PHP/MySQL) How do I add new folder, with the username, when a user registers?'
March 17, 2009
There are several ways to do this. Most sensible is using mkdir.
UPDATE:
There is nothing worse on Answers than someone who follows up a question with a criticism, then provides worse code.
In the code below, the user creates a directory based on a querystring parameter.
1. Anyone can now create whatever directories he wants to create on your server by simply calling the script and passing a new querystring parameter that contains the name of the directory he wants created.
2. To wreck your script and possibly crash your server, all a hacker has to do is poison the querystring parameter with a character he knows won’t be accepted by the filesystem.
3. The user needs to know the HTTP relative path to his directory so he can link to it. If he doesn’t know the directory path structure, he can’t access resources in his directory.
Yes, it is inherently unsafe to provide upload access to a directory that is in your HTTP path:
But this question says nothing about this.
I really wish that people would leave well enough alone on this board and not make fools of themselves by claiming something isn’t right, when it is; and then introducing code that creates a whole new bunch of problems that need to be resolved.
March 20, 2009
That’s a security vuln.
Use
Leave a comment