Re: Hoping for a hand with a login script

From: Date: Thu, 10 Sep 2009 16:31:33 +0000
Subject: Re: Hoping for a hand with a login script
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-297870@lists.php.net to get a copy of this message
Ben Dunlap wrote:
So I'm trying to set up a small website that includes a store ( www.rareintaglio.com), i have all of my HTML hammed out and now I'm working on creating an admin login for the sites owner to input data from a back
I would really strongly advise against building your own authentication system. I'm currently regretting the fact that I did the same, a few years ago, for a couple of systems I still support. There are just too many things that can go wrong, especially if you're new to PHP and MySQL in general. Just to begin with, the code you posted currently suffers from a really basic SQL injection vulnerability and your database is likely be compromised within hours of your site getting any kind of significant traffic. That's completely distinct from the more basic syntax trouble. Perhaps paradoxically, the more experience you gain with these things, the less inclined you will be, most likely, to try to roll your own AAA. There are lots of open-source PHP frameworks out there that should be able to take care of authentication and access-control for you -- CodeIgniter, Zend Framework, and Solar come immediately to mind as packages that I've either heard good things about, or suspect are solid because of the authors involved. I'm sure there are several other good ones also.
I find the more experienced I get, the more I have to wrap/plug into various authentication systems with custom authentication (MediaWiki, WordPress, PHPMyAdmin, Mantis, SquirrelMail, etc, etc). In some cases it's a straight up plugin process, in others it's wrapping with my own AccessControls management system. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP

« previous php.general (#297870) next »